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 query failure when accessing numeric types in BigQuery #10565

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Jan 12, 2022

Fixes #10564

Verified all tests locally.

@cla-bot cla-bot bot added the cla-signed label Jan 12, 2022
@ebyhr ebyhr force-pushed the ebi/bigquery-fix-numeric branch from 329b3af to 596a292 Compare January 12, 2022 10:54
@ebyhr ebyhr force-pushed the ebi/bigquery-fix-numeric branch from 596a292 to ebd83b9 Compare January 12, 2022 10:56
@ebyhr ebyhr requested a review from hashhar January 12, 2022 11:22
@@ -190,7 +191,7 @@ else if (type.equals(TIME_MICROS)) {
else if (javaType == double.class) {
type.writeDouble(output, ((Number) value).doubleValue());
}
else if (javaType == Slice.class) {
else if (javaType == Slice.class || type.getJavaType() == Int128.class) {
Copy link
Member

Choose a reason for hiding this comment

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

writeSlice method name is misleading.

Copy link
Member

Choose a reason for hiding this comment

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

Oh - next commit :)

@ksobolew
Copy link
Contributor

Can you add a regression test for this?

@ebyhr
Copy link
Member Author

ebyhr commented Jan 12, 2022

@ksobolew The tests already exist in testBigNumericMapping and testNumericMapping in TestBigQueryTypeMapping.

@ksobolew
Copy link
Contributor

@ksobolew The tests already exist in testBigNumericMapping and testNumericMapping in TestBigQueryTypeMapping.

...and they must be run manually, unfortunately. Thanks!

@ebyhr ebyhr merged commit 22a52ce into trinodb:master Jan 12, 2022
@ebyhr ebyhr deleted the ebi/bigquery-fix-numeric branch January 12, 2022 15:30
@ebyhr ebyhr mentioned this pull request Jan 12, 2022
@github-actions github-actions bot added this to the 369 milestone Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Fix broken numeric and bignumeric type mapping in BigQuery connector
5 participants