Skip to content

fix(redshift): support COUNT(ALL x) round-trip#7592

Open
fivetran-kwoodbeck wants to merge 2 commits intomainfrom
fix/redshift-count
Open

fix(redshift): support COUNT(ALL x) round-trip#7592
fivetran-kwoodbeck wants to merge 2 commits intomainfrom
fix/redshift-count

Conversation

@fivetran-kwoodbeck
Copy link
Copy Markdown
Collaborator

COUNT(ALL x) is valid Redshift syntax but previously threw a ParseError. ALL is also valid SQL-92 so the fix is applied in the base parser, added exp.AllQuantifier (similar to exp.Distinct) to preserve the ALL modifier through parse and generate, enabling identical roundtrip.

SELECT COUNT(ALL eventname) FROM event

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:fix/redshift-count, sqlglot version: fix/redshift-count)
  • baseline (main, sqlglot version: 0.0.1.dev1)

By Dialect

dialect main sqlglot:fix/redshift-count transitions links
bigquery -> bigquery 24647/24652 passed (100.0%) 23497/23497 passed (100.0%) No change full result / delta
bigquery -> duckdb 867/1154 passed (75.1%) 0/0 passed (0.0%) Results not found full result / delta
duckdb -> duckdb 5823/5823 passed (100.0%) 0/0 passed (0.0%) Results not found full result / delta
snowflake -> duckdb 1120/1935 passed (57.9%) 0/0 passed (0.0%) Results not found full result / delta
snowflake -> snowflake 65133/65133 passed (100.0%) 63027/63027 passed (100.0%) No change full result / delta
databricks -> databricks 1370/1370 passed (100.0%) 1370/1370 passed (100.0%) No change full result / delta
postgres -> postgres 6042/6042 passed (100.0%) 6042/6042 passed (100.0%) No change full result / delta
redshift -> redshift 7101/7101 passed (100.0%) 7101/7101 passed (100.0%) No change full result / delta

Overall

main: 113210 total, 112103 passed (pass rate: 99.0%), sqlglot version: 0.0.1.dev1

sqlglot:fix/redshift-count: 101037 total, 101037 passed (pass rate: 100.0%), sqlglot version: fix/redshift-count

Transitions:
No change

Dialect pair changes: 0 previous results not found, 3 current results not found

✅ 39 test(s) 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.

1 participant