-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support writing NUMERIC and BIGNUMERIC types in BigQuery #16145
Support writing NUMERIC and BIGNUMERIC types in BigQuery #16145
Conversation
// TODO https://github.com/trinodb/trino/issues/13741 Add support for decimal, time, timestamp with time zone, geography, map type | ||
// TODO https://github.com/trinodb/trino/issues/13741 Add support for time, timestamp with time zone, geography, map type | ||
if (type instanceof DecimalType) { | ||
return readBigDecimal((DecimalType) type, block, position).toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we pass here as BigDecimal - it's rounded
plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTypeUtils.java
Outdated
Show resolved
Hide resolved
plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BaseBigQueryTypeMapping.java
Outdated
Show resolved
Hide resolved
plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BaseBigQueryTypeMapping.java
Outdated
Show resolved
Hide resolved
plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryTypeUtils.java
Show resolved
Hide resolved
/test-with-secrets sha=0065d9bc28865cdcdc3293ef388a3bc91e34be02 |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/4200631454 |
0065d9b
to
0b6b4fc
Compare
plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BaseBigQueryTypeMapping.java
Outdated
Show resolved
Hide resolved
0b6b4fc
to
b6ceb4e
Compare
/test-with-secrets sha=b6ceb4e170fdc22655e770895f2d99bbe99da2e9 |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/4204994076 |
@@ -651,6 +713,11 @@ private DataSetup bigqueryCreateAndInsert(String tableNamePrefix) | |||
return new CreateAndInsertDataSetup(getBigQuerySqlExecutor(), tableNamePrefix); | |||
} | |||
|
|||
private DataSetup bigqueryCreateAndTrinoInsert(String tableNamePrefix) | |||
{ | |||
return new BigQueryCreateAndTrinoInsertDataSetup(new TrinoSqlExecutor(getQueryRunner(), getSession()), getBigQuerySqlExecutor(), tableNamePrefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BigQueryCreateAndTrinoInsertDataSetup
isn't necessary:
return new CreateAndTrinoInsertDataSetup(getBigQuerySqlExecutor(), new TrinoSqlExecutor(getQueryRunner()), tableNamePrefix);
b6ceb4e
to
faa0870
Compare
faa0870
to
3d88193
Compare
3d88193
to
f44db01
Compare
Description
Support writing NUMERIC and BIGNUMERIC types in BigQuery
Additional context and related issues
Release notes
(x) Release notes are required, with the following suggested text: