You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BIGINT is generally a signed 64-bit integer in SQL. In the SQL sources supported by Flux, for some of them we will convert a Flux uint into a BIGINT when writing to that DB via sql.to(). This could result silently writing an unexpected value to the SQL DB, if the uint is greater than 2^63 - 1. To avoid this, we should throw an error when a uint column is passed to to() for insertion and the target DB does not have an integer type that can store those values.
As an example, this is the current behavior for our Postgres support:
…n influxdb) (#3116)
* feat: add BigQuery support
* test: improving code coverage
* test: improve code coverage more
* chore: use updated driver version
* style: remove commented out code and extended comment
* test: column name rename to reflect type
* chore: go mod tidy
* fix: remove TUint mapping (#3067)
* chore: use bigquery 1.4.0 driver (older) to prevent protobuf dep update to 1.4.x
BIGINT is generally a signed 64-bit integer in SQL. In the SQL sources supported by Flux, for some of them we will convert a Flux uint into a BIGINT when writing to that DB via
sql.to()
. This could result silently writing an unexpected value to the SQL DB, if the uint is greater than2^63 - 1
. To avoid this, we should throw an error when a uint column is passed toto()
for insertion and the target DB does not have an integer type that can store those values.As an example, this is the current behavior for our Postgres support:
flux/stdlib/sql/postgres.go
Line 152 in cb41c28
Users can work around this by explicitly converting the values in a
uint
column toint
.Before we make these changes to Flux behavior we should ensure that conversions that would overflow will produce an error. The issue for that is #3066
The text was updated successfully, but these errors were encountered: