-
Notifications
You must be signed in to change notification settings - Fork 20
Integer and Float schema types fail after creation #219
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
Comments
This is a valid issue, and I agree that disallowing int/float would be a clean solution. |
I think I disagree it's a breaking change for two reasons:
|
|
I think that's the right path too, restrict in v1, properly solve in v2 (encoding the schema in metadata/description or something) |
Got a better solution: #220. We are internally upcasting int/float to long/double, without limiting users to larger types. |
When supplying an Avro schema type with the option to enable creating the BigQuery table, it maps:
This is fine, however on mapping back the schema from BigQuery to Avro on any subsequent run to validate the schema of the existing table against the Avro one, the mapper maps:
This makes sense I believe because BigQuery doesn't have the option for low actual int/float so it's only safe to upcast, but the connector shouldn't allow creating schemas with int/float to start with I think (or maybe does something super smart as storing the avro schema in the description of the table or something to be able to get it back).
At the moment, we wrote a custom schema checker to disallow the use of Avro's int/float as it will always fail otherwise, but this should be done in the connector.
Here is the validation snippet we currently use:
The text was updated successfully, but these errors were encountered: