Skip to content

test: add COPY INTO, LATERAL FLATTEN, and additional Snowflake dialect test coverage#173

Merged
sfc-gh-twhite merged 1 commit intoSnowflake-Labs:mainfrom
elipollak:fix/sqlglot-snowflake-dialect
Apr 2, 2026
Merged

test: add COPY INTO, LATERAL FLATTEN, and additional Snowflake dialect test coverage#173
sfc-gh-twhite merged 1 commit intoSnowflake-Labs:mainfrom
elipollak:fix/sqlglot-snowflake-dialect

Conversation

@elipollak
Copy link
Copy Markdown
Contributor

@elipollak elipollak commented Mar 9, 2026

Summary

Follow-up to #170 — adds test coverage for Snowflake-specific syntax that isn't covered by the existing tests:

Also adds Copy to the sql_statement_permissions example in the README so users know they can configure it explicitly.

Test plan

  • Existing tests continue to pass
  • New TestSnowflakeSpecificSyntax class passes (7 parametrized + 1 COPY INTO)

🤖 Generated with Claude Code

@elipollak elipollak force-pushed the fix/sqlglot-snowflake-dialect branch 3 times, most recently from 12a93c7 to 77273d6 Compare March 9, 2026 11:01
@bccolema
Copy link
Copy Markdown

bccolema commented Mar 12, 2026

Oooo, would this also separate SHOW out to its own setting option instead of bucketing it under command?!! If so, PLEASE APPROVE

@arborluke
Copy link
Copy Markdown

Ah I think I have duplicated this PR ! We came to the same conclusion! #179

@sfc-gh-twhite
Copy link
Copy Markdown
Collaborator

This should now be resolved with the merging of #170 - I do like these tests a lot though! Would you want to rebase and add these tests to cover statements like COPY?

We should also add an explicit example of this in the README as well.

mcp/README.md

Lines 74 to 81 in f74d74f

sql_statement_permissions: # List SQL statements to explicitly allow (True) or disallow (False).
# - All: True # To allow everything, uncomment and set All: True.
- Alter: True
- Command: True
- Comment: True
- Commit: True
- Create: True
- Delete: True

@elipollak elipollak force-pushed the fix/sqlglot-snowflake-dialect branch from 77273d6 to 047fbbd Compare April 2, 2026 11:45
@elipollak elipollak changed the title fix: use Snowflake dialect for sqlglot SQL parsing test: add COPY INTO, LATERAL FLATTEN, and additional Snowflake dialect test coverage Apr 2, 2026
…t test coverage

Add tests for Snowflake-specific syntax not covered by Snowflake-Labs#170: COPY INTO,
LATERAL FLATTEN, nested dot-path notation, bracket notation,
OBJECT_CONSTRUCT, and GET_PATH. Also add Copy to the README permissions
example so users can configure it explicitly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@elipollak elipollak force-pushed the fix/sqlglot-snowflake-dialect branch from 047fbbd to 7ca9fcd Compare April 2, 2026 11:50
@sfc-gh-twhite sfc-gh-twhite self-requested a review April 2, 2026 11:50
@elipollak
Copy link
Copy Markdown
Contributor Author

Sounds good @sfc-gh-twhite I rebased and updated the PR with the additional test coverage (COPY INTO, LATERAL FLATTEN, nested dot-path, bracket notation, OBJECT_CONSTRUCT, GET_PATH) and added Copy in the README permissions example.

Copy link
Copy Markdown
Collaborator

@sfc-gh-twhite sfc-gh-twhite left a comment

Choose a reason for hiding this comment

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

Thanks for the submission! Appreciate you rebasing after #170 to include your test for COPY INTO.

@sfc-gh-twhite sfc-gh-twhite merged commit 01c662e into Snowflake-Labs:main Apr 2, 2026
2 checks passed
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.

4 participants