Skip to content

Fix query failure when accessing numeric types in BigQuery#10565

Merged
ebyhr merged 2 commits intotrinodb:masterfrom
ebyhr:ebi/bigquery-fix-numeric
Jan 12, 2022
Merged

Fix query failure when accessing numeric types in BigQuery#10565
ebyhr merged 2 commits intotrinodb:masterfrom
ebyhr:ebi/bigquery-fix-numeric

Conversation

@ebyhr
Copy link
Copy Markdown
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
type.writeDouble(output, ((Number) value).doubleValue());
}
else if (javaType == Slice.class) {
else if (javaType == Slice.class || type.getJavaType() == Int128.class) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Can you add a regression test for this?

@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Jan 12, 2022

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

@ksobolew
Copy link
Copy Markdown
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