Skip to content

Comments

Extended the Snowflake COPY INTO data-load select item parser to support nested semi-structured path traversal#2223

Open
romanoff wants to merge 2 commits intoapache:mainfrom
romanoff:snowflake_copy_into_nested_semi_structured_path_traversal_support
Open

Extended the Snowflake COPY INTO data-load select item parser to support nested semi-structured path traversal#2223
romanoff wants to merge 2 commits intoapache:mainfrom
romanoff:snowflake_copy_into_nested_semi_structured_path_traversal_support

Conversation

@romanoff
Copy link
Contributor

Extended the Snowflake COPY INTO data-load select item parser to support nested semi-structured path traversal (e.g. $1:a:b:c) by looping over consecutive :element segments instead of consuming only one.

Example of query:

COPY INTO tbl (col) FROM (SELECT $1:a:b AS col FROM @stage)

Comment on lines +1515 to +1516
} else if let Token::Word(w) = parser.peek_token().token {
if !RESERVED_FOR_COLUMN_ALIAS.contains(&w.keyword) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to somehow reuse the is_column_alias method for this dialect instead?

Also can we add test cases that cover this behavior?

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.

2 participants