-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Wrong behavior of outputs.sql.convert unsigned setting #10671
Labels
bug
unexpected problem or unintended behavior
Comments
Thank you for confirming in the PR that this fixes things. I am going to re-open this since my PR isn't merge quite yet :) |
powersj
added a commit
to powersj/telegraf
that referenced
this issue
Feb 17, 2022
This more accurately refelcts the correct naming for unsigned datatypes. Additionally, this actually adds tests for the uint64 and float64 datatypes across clickhouse, mariadb, and postgres. Because postgres does not have support for unsigned values, the number is treated as a bigint. Fixes: influxdata#10671
powersj
added a commit
to powersj/telegraf
that referenced
this issue
Feb 24, 2022
Allow the user to specify a specific unsigned value to use for converstion rather than assume the integer value + unsigned. This is done via a new option. Additionally, this actually adds tests for the uint64 and float64 datatypes across clickhouse, mariadb, and postgres. Because postgres does not have support for unsigned values, the number is treated as a bigint. Fixes: influxdata#10671
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant telegraf.conf
Logs from Telegraf
2022-02-14T06:01:11Z E! [agent] Error writing to outputs.sql: code: 62, message: Syntax error: failed at position 72 ('UInt64'): UInt64,"inactive" Int64 UInt64,"vmalloc_chunk" Int64 UInt64,"sreclaimable" Int64 UInt64,"swap_cached" Int64 UInt64,"used" Int64 UInt64,"huge_pages_free" Int64 U. Expected one of: DEFAULT, MATERIALIZED, ALIAS, NOT, NULL, COMMENT, CODEC, TTL, token, Comma, ClosingRoundBracket
System info
Telegraf built from master branch (with #9671 PR merged), ArchLinux 5.16.8
Steps to reproduce
Expected behavior
No errors
Actual behavior
This line causes the error, because when value type is
uint64
thedatatype
becomesInt64 UInt64
.Additional info
Setting
unsigned
is exceptional, in fact it behaves more likeunsigned_suffix
now. To fix the issue the code should beas with other data type settings, and default config for setting
unsigned
should be changed toinstead of
UNSIGNED
is not a type on its own, it is a suffix.The text was updated successfully, but these errors were encountered: