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

Support set column type for Snowflake connector #21395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chenjian2664
Copy link
Contributor

Description

Additional context and related issues

Release notes

(x) Release notes are required, with the following suggested text:

# Snowflake
* Support set column type. ({issue}`issuenumber`)

Comment on lines +375 to +380
case "smallint":
case "integer":
return Optional.empty();
}
Copy link
Member

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.

Copy link
Member

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?

Copy link
Contributor Author

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).

Copy link
Member

@ebyhr ebyhr Apr 5, 2024

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.

Copy link
Contributor Author

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

Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Apr 26, 2024
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this May 17, 2024
@mosabua mosabua added stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. and removed stale labels May 17, 2024
@mosabua mosabua reopened this May 17, 2024
@mosabua
Copy link
Member

mosabua commented May 17, 2024

Reopening since I assume this is still in progress and valid @chenjian2664

@chenjian2664
Copy link
Contributor Author

we may need a mapping from number(xx, 0), bigint type -> smallint, tinyint, integer from Snowflake, then can support set column type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants