-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 set column type for Snowflake connector #21395
base: master
Are you sure you want to change the base?
Conversation
cfad94c
to
96aa7a3
Compare
case "smallint": | ||
case "integer": | ||
return Optional.empty(); | ||
} |
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.
Please leave a code comment why setup.asUnsupported()
doesn't work.
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.
INT , INTEGER , BIGINT , SMALLINT , TINYINT , BYTEINT are synonymous with NUMBER
I still couldn't understand why SET DATA TYPE
doesn't work for these types. What's the error message when changing bigint
to integer
? Why can't we use verifySetColumnTypeFailurePermissible
?
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.
All the number types are map to NUMBER
in Snowflake, thus we can not determine the type comes from Snowflake, from client side we only know the column type is BIGINT
with the different columnSize
.
Snowflake doesn't return error message for the operation, it actual change the columnSize
, i.e, change tinyint -> int
corresponding to change NUMBER(3,0)
-> NUMBER(10, 0)
.
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.
it actual change the columnSize
So, it means we shouldn't skip this test. Please consider adding a separate test.
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.
Then what's the expectation here, the set operation would be considered failed in Trino
plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java
Outdated
Show resolved
Hide resolved
96aa7a3
to
83e5787
Compare
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time. |
Reopening since I assume this is still in progress and valid @chenjian2664 |
we may need a mapping from number(xx, 0), bigint type -> smallint, tinyint, integer from Snowflake, then can support set column type. |
Description
Additional context and related issues
Release notes
(x) Release notes are required, with the following suggested text: