-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Correct numeric type mapping of Snowflake Connector #21755
Conversation
/test-with-secrets sha=71772a083bde0174b2977a996b45ef4d233327cf |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/8887484201 |
Please check CI failure: https://github.com/trinodb/trino/actions/runs/8887484201/job/24402865556 |
@ebyhr Updated. |
/test-with-secrets sha=410c334554932a7b1a9a071a0c69115727495123 |
The CI workflow run with tests that require additional secrets has been started: https://github.com/trinodb/trino/actions/runs/8902552225 |
plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java
Show resolved
Hide resolved
plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestingSnowflakeServer.java
Outdated
Show resolved
Hide resolved
| `timestampntz` | `timestamp` | | ||
|
||
Complete list of [Snowflake data types](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types.html). | ||
Because Trino and Snowflake each support types that the other does not, this |
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.
cc: @mosabua
For fixed-point numbers: - All fixed-point numeric types are decimals (NUMBER in Snowflake). - INT , INTEGER , BIGINT , SMALLINT , TINYINT , BYTEINT are synonymous with NUMBER(38, 0). For floating-point numbers: - FLOAT, FLOAT4, FLOAT8, DOUBLE, DOUBLE PRECISION, REAL are synonymous with each other. They're all 64-bit floating-point numbers.
Thanks @ebyhr . Comments addressed. |
Nice! |
Description
Final part of #21012. Fixing #20977.
Without this commit, Snowflake session property
JDBC_TREAT_DECIMAL_AS_INT
is set to default value, which isTRUE
. This will cause a problem when decimal values exceedLong.MAX_VALUE
.Reference: https://docs.snowflake.com/en/sql-reference/data-types-numeric, https://docs.snowflake.com/en/sql-reference/parameters#jdbc-treat-decimal-as-int
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: