chore(optimizer)!: annotate snowflake ARRAY_COMPACT#6735
Merged
Conversation
Contributor
SQLGlot Integration Test ResultsComparing:
By Dialect
Overallmain: 1694 total, 1446 passed (pass rate: 85.4%), sqlglot version: sqlglot:mlee/annotate-array_compact: 1694 total, 1446 passed (pass rate: 85.4%), sqlglot version: Difference: No change |
geooo109
reviewed
Jan 14, 2026
Comment on lines
+6074
to
+6075
| class ArrayCompact(Func): | ||
| pass |
Collaborator
There was a problem hiding this comment.
Let's also test the rest of the dialects and add additional tests.
For example this function exists in spark and databricks.
VaggelisD
approved these changes
Jan 14, 2026
Collaborator
VaggelisD
left a comment
There was a problem hiding this comment.
Nice work, I'll go ahead and add the remaining tests thanks!
dangotbanned
added a commit
to narwhals-dev/narwhals
that referenced
this pull request
Feb 4, 2026
- Pin added #3432 - Original issue resolved eakmanrq/sqlframe#577 - Current pin blocking tobymao/sqlglot#6735 - Pin complained about #3445 (comment)
MarcoGorelli
pushed a commit
to narwhals-dev/narwhals
that referenced
this pull request
Feb 4, 2026
- Pin added #3432 - Original issue resolved eakmanrq/sqlframe#577 - Current pin blocking tobymao/sqlglot#6735 - Pin complained about #3445 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds type annotation support for Snowflake's
ARRAY_COMPACTfunction.Changes
ArrayCompactexpression class toexpressions.pyARRAY_COMPACTintyping/snowflake.pytest_snowflake.pyandannotate_functions.sqlARRAY_COMPACT Support Across Dialects
array: ARRAY (or VARIANT containing array)array: ARRAYarray: ARRAYNote:
ARRAY_COMPACTremoves NULL values from an existing array. This is different fromARRAY_CONSTRUCT_COMPACT, which constructs a new array while omitting NULL values during construction.