Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: write failed when value is zero #38

Merged
merged 6 commits into from
Aug 15, 2024

Conversation

daviderli614
Copy link
Member

@daviderli614 daviderli614 commented Aug 14, 2024

What's changed and what's your intention?

When the id value is 0, the write result is as follows, the id column shows null, we should allow 0 value to be written.

mysql> select *from monitors_with_tag;
+------+-----------+--------+------+-------------+---------+----------------------------+
| id   | host      | memory | cpu  | temperature | running | ts                         |
+------+-----------+--------+------+-------------+---------+----------------------------+
| NULL | 127.0.0.1 |      1 |  1.1 |          -1 |       1 | 2024-08-14 09:09:29.520000 |
| NULL | 127.0.0.1 |      1 |  1.1 |          -1 |       1 | 2024-08-14 09:09:29.710000 |
| NULL | 127.0.0.2 |      2 |    2 |          -2 |       1 | 2024-08-14 09:09:29.520000 |
| NULL | 127.0.0.2 |      2 |    2 |          -2 |       1 | 2024-08-14 09:09:29.710000 |
+------+-----------+--------+------+-------------+---------+----------------------------+

Checklist

  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

examples/object/README.md Outdated Show resolved Hide resolved
@daviderli614
Copy link
Member Author

PTAL @yuanbohan @fengjiachun

Copy link
Contributor

@yuanbohan yuanbohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

schema/field.go Show resolved Hide resolved
@daviderli614 daviderli614 merged commit cf6fa66 into GreptimeTeam:main Aug 15, 2024
5 checks passed
@daviderli614 daviderli614 deleted the fix/zero-val branch August 15, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants