Skip to content

Add support for Snowflake identifier function #1929

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

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

Conversation

yoavcloud
Copy link
Contributor

Expand the support for the IDENTIFIER function in Snowflake, which is used to generate identifiers dynamically. See here: https://docs.snowflake.com/en/sql-reference/identifier-literal

The ObjectNamePart enum was extended with a new part type to support the use of the identifier function as an object name. Some work went into organizing Parser:parse_object_name a bit.

A few examples:

-- identifier for table name
create or replace temp table identifier('test')(c1 int, identifier int); 
-- identifier for column name
select identifier('identifier') from test;
-- identifier for table name
select c1 from identifier('test');
-- identifier for table alias
select identifier('alias1').* from test as alias1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant