sqlglot 27.9.0__tar.gz → 27.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlglot-27.9.0 → sqlglot-27.11.0}/CHANGELOG.md +209 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/PKG-INFO +2 -2
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/_version.py +3 -3
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/bigquery.py +99 -10
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/dremio.py +29 -4
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/postgres.py +0 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/singlestore.py +175 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/snowflake.py +1 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/spark2.py +2 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/sqlite.py +1 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/expressions.py +106 -3
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/generator.py +43 -5
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/scope.py +1 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/parser.py +40 -3
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/tokens.py +3 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.egg-info/PKG-INFO +2 -2
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.egg-info/requires.txt +1 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/Cargo.lock +1 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/Cargo.toml +1 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/src/tokenizer.rs +1 -1
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_bigquery.py +66 -3
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_clickhouse.py +4 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_databricks.py +9 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_dialect.py +173 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_dremio.py +27 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_duckdb.py +12 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_mysql.py +15 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_oracle.py +28 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_postgres.py +75 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_redshift.py +19 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_singlestore.py +273 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_snowflake.py +18 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_spark.py +10 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_tsql.py +4 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/identity.sql +11 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/annotate_functions.sql +312 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/qualify_columns.sql +4 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/.gitignore +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/.gitpod.yml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/CONTRIBUTING.md +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/LICENSE +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/MANIFEST.in +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/Makefile +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/README.md +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/pyproject.toml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/setup.cfg +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/setup.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/__main__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/_typing.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/dialect.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/diff.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/errors.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/helper.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/lineage.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/merge_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/qualify_columns.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/simplify.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/planner.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/py.typed +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/schema.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/serde.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/time.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/transforms.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot/trie.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.egg-info/SOURCES.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglot.png +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/benches/dialect_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/benches/long.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/benches/token_type_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/benches/tokenizer_dialect_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/benches/tokenizer_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/pyproject.toml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/src/lib.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/src/settings.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/src/token.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/sqlglotrs/src/trie.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_sqlite.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/helpers.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_build.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_diff.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_docs.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_executor.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_expressions.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_generator.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_helper.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_lineage.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_optimizer.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_parser.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_schema.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_serde.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_time.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_tokens.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_transforms.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.11.0}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,213 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v27.10.0] - 2025-08-28
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`de2fe15`](https://github.com/tobymao/sqlglot/commit/de2fe1503b5bb003431d1f0c7b9ae87932a6cc1c) - annotate type for bq CONTAINS_SUBSTR *(PR [#5705](https://github.com/tobymao/sqlglot/pull/5705) by [@geooo109](https://github.com/geooo109))*:
|
|
7
|
+
|
|
8
|
+
annotate type for bq CONTAINS_SUBSTR (#5705)
|
|
9
|
+
|
|
10
|
+
- due to [`770888f`](https://github.com/tobymao/sqlglot/commit/770888f4e9a9061329e3c416f968f7dd9639fb81) - annotate type for bq NORMALIZE *(PR [#5711](https://github.com/tobymao/sqlglot/pull/5711) by [@geooo109](https://github.com/geooo109))*:
|
|
11
|
+
|
|
12
|
+
annotate type for bq NORMALIZE (#5711)
|
|
13
|
+
|
|
14
|
+
- due to [`506033f`](https://github.com/tobymao/sqlglot/commit/506033f299f7a4c28f6efd8bf715be5dcf73e929) - parse and annotate type for bq NORMALIZE_AND_CASEFOLD *(PR [#5712](https://github.com/tobymao/sqlglot/pull/5712) by [@geooo109](https://github.com/geooo109))*:
|
|
15
|
+
|
|
16
|
+
parse and annotate type for bq NORMALIZE_AND_CASEFOLD (#5712)
|
|
17
|
+
|
|
18
|
+
- due to [`848aea1`](https://github.com/tobymao/sqlglot/commit/848aea1dbaaeb580b633796dcca06c28314b9c3e) - parse and annotate type for bq OCTET_LENGTH *(PR [#5713](https://github.com/tobymao/sqlglot/pull/5713) by [@geooo109](https://github.com/geooo109))*:
|
|
19
|
+
|
|
20
|
+
parse and annotate type for bq OCTET_LENGTH (#5713)
|
|
21
|
+
|
|
22
|
+
- due to [`727bf83`](https://github.com/tobymao/sqlglot/commit/727bf8378f232188d35834d980b035552999ea3b) - add support for REVOKE DDL *(PR [#5703](https://github.com/tobymao/sqlglot/pull/5703) by [@newtonapple](https://github.com/newtonapple))*:
|
|
23
|
+
|
|
24
|
+
add support for REVOKE DDL (#5703)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### :sparkles: New Features
|
|
28
|
+
- [`f6f8f56`](https://github.com/tobymao/sqlglot/commit/f6f8f56a59d550dfc7dfcab0c3b9a6885c7e758a) - **singlestore**: Fixed parsing/generation of exp.JSONFormat *(PR [#5706](https://github.com/tobymao/sqlglot/pull/5706) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
29
|
+
- [`de2fe15`](https://github.com/tobymao/sqlglot/commit/de2fe1503b5bb003431d1f0c7b9ae87932a6cc1c) - **optimizer**: annotate type for bq CONTAINS_SUBSTR *(PR [#5705](https://github.com/tobymao/sqlglot/pull/5705) by [@geooo109](https://github.com/geooo109))*
|
|
30
|
+
- [`a78146e`](https://github.com/tobymao/sqlglot/commit/a78146e37bfc972050b4467c39769407061e9bc3) - **singlestore**: Fixed parsing/generation of exp.DateBin *(PR [#5709](https://github.com/tobymao/sqlglot/pull/5709) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
31
|
+
- [`ab0c985`](https://github.com/tobymao/sqlglot/commit/ab0c985424ae9d9340eafd15ecdc9b31bdd8837c) - **singlestore**: Marked exp.Reduce finish argument as unsupported *(PR [#5707](https://github.com/tobymao/sqlglot/pull/5707) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
32
|
+
- [`770888f`](https://github.com/tobymao/sqlglot/commit/770888f4e9a9061329e3c416f968f7dd9639fb81) - **optimizer**: annotate type for bq NORMALIZE *(PR [#5711](https://github.com/tobymao/sqlglot/pull/5711) by [@geooo109](https://github.com/geooo109))*
|
|
33
|
+
- [`506033f`](https://github.com/tobymao/sqlglot/commit/506033f299f7a4c28f6efd8bf715be5dcf73e929) - **optimizer**: parse and annotate type for bq NORMALIZE_AND_CASEFOLD *(PR [#5712](https://github.com/tobymao/sqlglot/pull/5712) by [@geooo109](https://github.com/geooo109))*
|
|
34
|
+
- [`848aea1`](https://github.com/tobymao/sqlglot/commit/848aea1dbaaeb580b633796dcca06c28314b9c3e) - **optimizer**: parse and annotate type for bq OCTET_LENGTH *(PR [#5713](https://github.com/tobymao/sqlglot/pull/5713) by [@geooo109](https://github.com/geooo109))*
|
|
35
|
+
- [`727bf83`](https://github.com/tobymao/sqlglot/commit/727bf8378f232188d35834d980b035552999ea3b) - add support for REVOKE DDL *(PR [#5703](https://github.com/tobymao/sqlglot/pull/5703) by [@newtonapple](https://github.com/newtonapple))*
|
|
36
|
+
|
|
37
|
+
### :bug: Bug Fixes
|
|
38
|
+
- [`0427c7b`](https://github.com/tobymao/sqlglot/commit/0427c7b7aa9f8161324085a98c5f531fa35c8b0c) - **optimizer**: qualify columns for AggFunc with DISTINCT *(PR [#5708](https://github.com/tobymao/sqlglot/pull/5708) by [@geooo109](https://github.com/geooo109))*
|
|
39
|
+
- :arrow_lower_right: *fixes issue [#5698](https://github.com/tobymao/sqlglot/issues/5698) opened by [@georgesittas](https://github.com/georgesittas)*
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [v27.9.0] - 2025-08-27
|
|
43
|
+
### :boom: BREAKING CHANGES
|
|
44
|
+
- due to [`7b180bd`](https://github.com/tobymao/sqlglot/commit/7b180bdc3da9e39946c22970bd2523f7d8beaf29) - raise if query modifier is specified multiple times *(PR [#5608](https://github.com/tobymao/sqlglot/pull/5608) by [@georgesittas](https://github.com/georgesittas))*:
|
|
45
|
+
|
|
46
|
+
raise if query modifier is specified multiple times (#5608)
|
|
47
|
+
|
|
48
|
+
- due to [`36602a2`](https://github.com/tobymao/sqlglot/commit/36602a2ecc9ffca98e89044d23e40f33c6ed71e4) - parse LIST_FILTER into ArrayFilter closes [#5633](https://github.com/tobymao/sqlglot/pull/5633) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
49
|
+
|
|
50
|
+
parse LIST_FILTER into ArrayFilter closes #5633
|
|
51
|
+
|
|
52
|
+
- due to [`0188d21`](https://github.com/tobymao/sqlglot/commit/0188d21d443c991a528eb9d220459890b7dca477) - parse LIST_TRANSFORM into Transform closes [#5634](https://github.com/tobymao/sqlglot/pull/5634) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
53
|
+
|
|
54
|
+
parse LIST_TRANSFORM into Transform closes #5634
|
|
55
|
+
|
|
56
|
+
- due to [`3ab1d44`](https://github.com/tobymao/sqlglot/commit/3ab1d4487279cab3be2d3764e51516c6db21629d) - Wrap CONCAT items with COALESCE less aggressively *(PR [#5641](https://github.com/tobymao/sqlglot/pull/5641) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
57
|
+
|
|
58
|
+
Wrap CONCAT items with COALESCE less aggressively (#5641)
|
|
59
|
+
|
|
60
|
+
- due to [`af0b299`](https://github.com/tobymao/sqlglot/commit/af0b299561914953b30ab36004e53dcb92d39e1c) - Qualify columns generated by exp.Aliases *(PR [#5647](https://github.com/tobymao/sqlglot/pull/5647) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
61
|
+
|
|
62
|
+
Qualify columns generated by exp.Aliases (#5647)
|
|
63
|
+
|
|
64
|
+
- due to [`53aa8fe`](https://github.com/tobymao/sqlglot/commit/53aa8fe7f188012f765066f32c4179035fff036d) - support alter table with check closes [#5649](https://github.com/tobymao/sqlglot/pull/5649) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
65
|
+
|
|
66
|
+
support alter table with check closes #5649
|
|
67
|
+
|
|
68
|
+
- due to [`1a60a5a`](https://github.com/tobymao/sqlglot/commit/1a60a5a845c7431d7d3d7ccb71119699316f4b41) - Added parsing/generation of JSON_ARRAY_CONTAINS function *(PR [#5661](https://github.com/tobymao/sqlglot/pull/5661) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*:
|
|
69
|
+
|
|
70
|
+
Added parsing/generation of JSON_ARRAY_CONTAINS function (#5661)
|
|
71
|
+
|
|
72
|
+
- due to [`e0db0a9`](https://github.com/tobymao/sqlglot/commit/e0db0a95d3cb7614242dbd1b439d408e7e7bd475) - add parse and annotate type for bigquery FARM_FINGERPRINT *(PR [#5667](https://github.com/tobymao/sqlglot/pull/5667) by [@geooo109](https://github.com/geooo109))*:
|
|
73
|
+
|
|
74
|
+
add parse and annotate type for bigquery FARM_FINGERPRINT (#5667)
|
|
75
|
+
|
|
76
|
+
- due to [`56588c7`](https://github.com/tobymao/sqlglot/commit/56588c7e22b4db4f0e44696a460483ca1e549163) - Add support for vector_search function. Move predict to BigQuery dialect. *(PR [#5660](https://github.com/tobymao/sqlglot/pull/5660) by [@rloredo](https://github.com/rloredo))*:
|
|
77
|
+
|
|
78
|
+
Add support for vector_search function. Move predict to BigQuery dialect. (#5660)
|
|
79
|
+
|
|
80
|
+
- due to [`a688a0f`](https://github.com/tobymao/sqlglot/commit/a688a0f0d70f87139e531d1419b338b695bec384) - parse and annotate type for bigquery APPROX_TOP_COUNT *(PR [#5670](https://github.com/tobymao/sqlglot/pull/5670) by [@geooo109](https://github.com/geooo109))*:
|
|
81
|
+
|
|
82
|
+
parse and annotate type for bigquery APPROX_TOP_COUNT (#5670)
|
|
83
|
+
|
|
84
|
+
- due to [`3c93fcc`](https://github.com/tobymao/sqlglot/commit/3c93fcce96ec82e78753f6c9dd5fb0e730a82058) - parse and annotate type for bigquery APPROX_TOP_SUM *(PR [#5675](https://github.com/tobymao/sqlglot/pull/5675) by [@geooo109](https://github.com/geooo109))*:
|
|
85
|
+
|
|
86
|
+
parse and annotate type for bigquery APPROX_TOP_SUM (#5675)
|
|
87
|
+
|
|
88
|
+
- due to [`741d45a`](https://github.com/tobymao/sqlglot/commit/741d45a0ca7c1bad67da4393cd10cc9cfa49ea68) - parse and annotate type for bigquery FROM/TO_BASE32 *(PR [#5676](https://github.com/tobymao/sqlglot/pull/5676) by [@geooo109](https://github.com/geooo109))*:
|
|
89
|
+
|
|
90
|
+
parse and annotate type for bigquery FROM/TO_BASE32 (#5676)
|
|
91
|
+
|
|
92
|
+
- due to [`9ae045c`](https://github.com/tobymao/sqlglot/commit/9ae045c0405e43b148e3b9261825288ebf09100c) - parse and annotate type for bigquery FROM_HEX *(PR [#5679](https://github.com/tobymao/sqlglot/pull/5679) by [@geooo109](https://github.com/geooo109))*:
|
|
93
|
+
|
|
94
|
+
parse and annotate type for bigquery FROM_HEX (#5679)
|
|
95
|
+
|
|
96
|
+
- due to [`5a22a25`](https://github.com/tobymao/sqlglot/commit/5a22a254143978989027f6e7f6163019a34f112a) - annotate type for bigquery TO_HEX *(PR [#5680](https://github.com/tobymao/sqlglot/pull/5680) by [@geooo109](https://github.com/geooo109))*:
|
|
97
|
+
|
|
98
|
+
annotate type for bigquery TO_HEX (#5680)
|
|
99
|
+
|
|
100
|
+
- due to [`5c1eb2d`](https://github.com/tobymao/sqlglot/commit/5c1eb2df5dd3dcc6ed2c8204cec56b5c3d276f87) - parse and annotate type for bq PARSE_BIG/NUMERIC *(PR [#5690](https://github.com/tobymao/sqlglot/pull/5690) by [@geooo109](https://github.com/geooo109))*:
|
|
101
|
+
|
|
102
|
+
parse and annotate type for bq PARSE_BIG/NUMERIC (#5690)
|
|
103
|
+
|
|
104
|
+
- due to [`311373d`](https://github.com/tobymao/sqlglot/commit/311373d22134de906d1c1cef019541e85e2f7c9f) - parse and annotate type for bq CODE_POINTS_TO_BYTES *(PR [#5686](https://github.com/tobymao/sqlglot/pull/5686) by [@geooo109](https://github.com/geooo109))*:
|
|
105
|
+
|
|
106
|
+
parse and annotate type for bq CODE_POINTS_TO_BYTES (#5686)
|
|
107
|
+
|
|
108
|
+
- due to [`79d9de1`](https://github.com/tobymao/sqlglot/commit/79d9de1745598f8f3ae2c82c1389dd455c946a09) - parse and annotate type for bq TO_CODE_POINTS *(PR [#5685](https://github.com/tobymao/sqlglot/pull/5685) by [@geooo109](https://github.com/geooo109))*:
|
|
109
|
+
|
|
110
|
+
parse and annotate type for bq TO_CODE_POINTS (#5685)
|
|
111
|
+
|
|
112
|
+
- due to [`5df3ea9`](https://github.com/tobymao/sqlglot/commit/5df3ea92f59125955124ea1883b777b489db3042) - parse and annotate type for bq SAFE_CONVERT_BYTES_TO_STRING *(PR [#5681](https://github.com/tobymao/sqlglot/pull/5681) by [@geooo109](https://github.com/geooo109))*:
|
|
113
|
+
|
|
114
|
+
parse and annotate type for bq SAFE_CONVERT_BYTES_TO_STRING (#5681)
|
|
115
|
+
|
|
116
|
+
- due to [`c832746`](https://github.com/tobymao/sqlglot/commit/c832746018fbc2c531d5b2a7c7f8cd5d78e511ff) - parse and annotate type for bigquery APPROX_QUANTILES *(PR [#5678](https://github.com/tobymao/sqlglot/pull/5678) by [@geooo109](https://github.com/geooo109))*:
|
|
117
|
+
|
|
118
|
+
parse and annotate type for bigquery APPROX_QUANTILES (#5678)
|
|
119
|
+
|
|
120
|
+
- due to [`99e169e`](https://github.com/tobymao/sqlglot/commit/99e169ea13d5be3712a47f6b55b98a4764a3c24d) - parse and annotate type for bq BOOL *(PR [#5697](https://github.com/tobymao/sqlglot/pull/5697) by [@geooo109](https://github.com/geooo109))*:
|
|
121
|
+
|
|
122
|
+
parse and annotate type for bq BOOL (#5697)
|
|
123
|
+
|
|
124
|
+
- due to [`3f31770`](https://github.com/tobymao/sqlglot/commit/3f31770c793f464fcac1ce2b8dfa03d4b7f0231c) - parse and annotate type for bq FLOAT64 *(PR [#5700](https://github.com/tobymao/sqlglot/pull/5700) by [@geooo109](https://github.com/geooo109))*:
|
|
125
|
+
|
|
126
|
+
parse and annotate type for bq FLOAT64 (#5700)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### :sparkles: New Features
|
|
130
|
+
- [`02e60e7`](https://github.com/tobymao/sqlglot/commit/02e60e73fc0c2dae815aa225be247a17ccdf4b82) - **singlestore**: desugarize DAYNAME into DATE_FORMAT *(PR [#5610](https://github.com/tobymao/sqlglot/pull/5610) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
131
|
+
- [`7b180bd`](https://github.com/tobymao/sqlglot/commit/7b180bdc3da9e39946c22970bd2523f7d8beaf29) - **parser**: raise if query modifier is specified multiple times *(PR [#5608](https://github.com/tobymao/sqlglot/pull/5608) by [@georgesittas](https://github.com/georgesittas))*
|
|
132
|
+
- :arrow_lower_right: *addresses issue [#5604](https://github.com/tobymao/sqlglot/issues/5604) opened by [@bricct](https://github.com/bricct)*
|
|
133
|
+
- [`442eafc`](https://github.com/tobymao/sqlglot/commit/442eafcb00a2650930bd6023aa9a5febfebbe796) - **singlestore**: Added parsing of HOUR function *(PR [#5612](https://github.com/tobymao/sqlglot/pull/5612) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
134
|
+
- [`5320359`](https://github.com/tobymao/sqlglot/commit/532035978605efd1d43de75aafca750e2894c0b9) - **singlestore**: Added parsing of MICROSECOND function *(PR [#5619](https://github.com/tobymao/sqlglot/pull/5619) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
135
|
+
- [`db1db97`](https://github.com/tobymao/sqlglot/commit/db1db9732352187629df853ad937ebaf4abfe487) - **doris**: update exp.UniqueKeyProperty SQL generation logic *(PR [#5613](https://github.com/tobymao/sqlglot/pull/5613) by [@xinge-ji](https://github.com/xinge-ji))*
|
|
136
|
+
- [`54623a6`](https://github.com/tobymao/sqlglot/commit/54623a6b85432272703f12a197b05ced78529f90) - **singlestore**: Added parsing of MINUTE function *(PR [#5620](https://github.com/tobymao/sqlglot/pull/5620) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
137
|
+
- [`565c9f8`](https://github.com/tobymao/sqlglot/commit/565c9f8c55cfbef5d3a9e1470551f1dc4416825e) - **singlestore**: Added generation of DAYOFWEEK_ISO function *(PR [#5627](https://github.com/tobymao/sqlglot/pull/5627) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
138
|
+
- [`8db916e`](https://github.com/tobymao/sqlglot/commit/8db916e2f2ce241bdff130d626f98df182b48f3e) - **singlestore**: Added parsing of WEEKDAY function *(PR [#5624](https://github.com/tobymao/sqlglot/pull/5624) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
139
|
+
- [`aa6274a`](https://github.com/tobymao/sqlglot/commit/aa6274a0ea647df1251563945635260a6ddd4972) - **singlestore**: Fixed generation of DAY_OF_MONTH function *(PR [#5629](https://github.com/tobymao/sqlglot/pull/5629) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
140
|
+
- [`dee44b8`](https://github.com/tobymao/sqlglot/commit/dee44b8c1d70ca6079867896fb68cad256909dad) - **singlestore**: Added parsing of MONTHNAME function *(PR [#5623](https://github.com/tobymao/sqlglot/pull/5623) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
141
|
+
- [`deebf0c`](https://github.com/tobymao/sqlglot/commit/deebf0c3cc379e28c4ab66b6bb7a9c84c14e88c6) - **singlestore**: Added parsing of SECOND function *(PR [#5621](https://github.com/tobymao/sqlglot/pull/5621) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
142
|
+
- [`12a60b9`](https://github.com/tobymao/sqlglot/commit/12a60b99b6b2b0673b57218c691794deb67aa3a5) - **singlestore**: Removed redundant deletions from TRANSFORMS *(PR [#5632](https://github.com/tobymao/sqlglot/pull/5632) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
143
|
+
- [`36602a2`](https://github.com/tobymao/sqlglot/commit/36602a2ecc9ffca98e89044d23e40f33c6ed71e4) - **duckdb**: parse LIST_FILTER into ArrayFilter closes [#5633](https://github.com/tobymao/sqlglot/pull/5633) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
144
|
+
- [`0188d21`](https://github.com/tobymao/sqlglot/commit/0188d21d443c991a528eb9d220459890b7dca477) - **duckdb**: parse LIST_TRANSFORM into Transform closes [#5634](https://github.com/tobymao/sqlglot/pull/5634) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
145
|
+
- [`b117d59`](https://github.com/tobymao/sqlglot/commit/b117d59f3c43f6f44cd0ccdf22717f7bcd990889) - **dremio**: add dremio date_add and date_sub parsing *(PR [#5617](https://github.com/tobymao/sqlglot/pull/5617) by [@jasonthomassql](https://github.com/jasonthomassql))*
|
|
146
|
+
- [`999b9e7`](https://github.com/tobymao/sqlglot/commit/999b9e793c0819a4d2af6400fc924946d26b3e6f) - **singlestore**: Changed generation of exp.TsOrDsToDate to handle case when format is not provided *(PR [#5639](https://github.com/tobymao/sqlglot/pull/5639) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
147
|
+
- [`b556e97`](https://github.com/tobymao/sqlglot/commit/b556e97f8cfbde21c0a921ac1c01c9e4f2ec2535) - **singlestore**: Marked exp.All as unsupported *(PR [#5640](https://github.com/tobymao/sqlglot/pull/5640) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
148
|
+
- [`c076694`](https://github.com/tobymao/sqlglot/commit/c0766946e6799fb61c38e855fd18812d08a5c251) - **clickhouse**: support custom partition key expressions *(PR [#5645](https://github.com/tobymao/sqlglot/pull/5645) by [@GaliFFun](https://github.com/GaliFFun))*
|
|
149
|
+
- [`cab62b0`](https://github.com/tobymao/sqlglot/commit/cab62b06ce926e3116a6a45a9c57e4901cd8a281) - **doris**: add support for BUILD and REFRESH properties in materialized view *(PR [#5614](https://github.com/tobymao/sqlglot/pull/5614) by [@xinge-ji](https://github.com/xinge-ji))*
|
|
150
|
+
- [`af0b299`](https://github.com/tobymao/sqlglot/commit/af0b299561914953b30ab36004e53dcb92d39e1c) - **optimizer**: Qualify columns generated by exp.Aliases *(PR [#5647](https://github.com/tobymao/sqlglot/pull/5647) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
151
|
+
- :arrow_lower_right: *addresses issue [#5638](https://github.com/tobymao/sqlglot/issues/5638) opened by [@catlynkong](https://github.com/catlynkong)*
|
|
152
|
+
- [`981e0e7`](https://github.com/tobymao/sqlglot/commit/981e0e70a304665e746158c859bcc81f99384685) - **doris**: add support for PARTITION BY LIST *(PR [#5615](https://github.com/tobymao/sqlglot/pull/5615) by [@xinge-ji](https://github.com/xinge-ji))*
|
|
153
|
+
- [`53aa8fe`](https://github.com/tobymao/sqlglot/commit/53aa8fe7f188012f765066f32c4179035fff036d) - **tsql**: support alter table with check closes [#5649](https://github.com/tobymao/sqlglot/pull/5649) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
154
|
+
- [`23cac6c`](https://github.com/tobymao/sqlglot/commit/23cac6c58099a9ac818ac5d3970a427ca3579cca) - **exasol**: Add support for GROUP_CONCAT and LISTAGG functions *(PR [#5646](https://github.com/tobymao/sqlglot/pull/5646) by [@nnamdi16](https://github.com/nnamdi16))*
|
|
155
|
+
- [`d087ac8`](https://github.com/tobymao/sqlglot/commit/d087ac89376df5ab16de99c8b67f99060f0a6170) - **bigquery**: Add support for ml.generate_embedding function *(PR [#5652](https://github.com/tobymao/sqlglot/pull/5652) by [@rloredo](https://github.com/rloredo))*
|
|
156
|
+
- [`e71bcb5`](https://github.com/tobymao/sqlglot/commit/e71bcb51181de63c8ad13004216506529fcf9644) - **dremio**: support array_generate_range *(PR [#5653](https://github.com/tobymao/sqlglot/pull/5653) by [@jasonthomassql](https://github.com/jasonthomassql))*
|
|
157
|
+
- [`edbd04b`](https://github.com/tobymao/sqlglot/commit/edbd04b6a91b1a6f76e4fa938098ba5ed581ba72) - **singlestore**: Fixed generation of exp.RegexpLike *(PR [#5663](https://github.com/tobymao/sqlglot/pull/5663) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
158
|
+
- [`4992edb`](https://github.com/tobymao/sqlglot/commit/4992edbb79f4922917cc5ce5aa687e6f7da7798c) - **singlestore**: Fixed exp.Xor generation *(PR [#5662](https://github.com/tobymao/sqlglot/pull/5662) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
159
|
+
- [`20de3d3`](https://github.com/tobymao/sqlglot/commit/20de3d37cdae0705c67f80fbacbe024a62f34657) - **singlestore**: Fixed parsing/generation of exp.Hll *(PR [#5664](https://github.com/tobymao/sqlglot/pull/5664) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
160
|
+
- [`1a60a5a`](https://github.com/tobymao/sqlglot/commit/1a60a5a845c7431d7d3d7ccb71119699316f4b41) - **singlestore**: Added parsing/generation of JSON_ARRAY_CONTAINS function *(PR [#5661](https://github.com/tobymao/sqlglot/pull/5661) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
161
|
+
- [`f662dc0`](https://github.com/tobymao/sqlglot/commit/f662dc0b47fd14d00899c14a899756a5ba1fe9da) - **singlestore**: Fixed generation of exp.ApproxDistinct *(PR [#5666](https://github.com/tobymao/sqlglot/pull/5666) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
162
|
+
- [`e0db0a9`](https://github.com/tobymao/sqlglot/commit/e0db0a95d3cb7614242dbd1b439d408e7e7bd475) - **optimizer**: add parse and annotate type for bigquery FARM_FINGERPRINT *(PR [#5667](https://github.com/tobymao/sqlglot/pull/5667) by [@geooo109](https://github.com/geooo109))*
|
|
163
|
+
- [`dcd4ef7`](https://github.com/tobymao/sqlglot/commit/dcd4ef769727ed1227911f2d9a85244d61173003) - **singlestore**: Fixed exp.CountIf generation *(PR [#5668](https://github.com/tobymao/sqlglot/pull/5668) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
164
|
+
- [`e431e85`](https://github.com/tobymao/sqlglot/commit/e431e851c2c5d20f049adbc38e370a64d39c346f) - **singlestore**: Fixed generation of exp.LogicalOr *(PR [#5669](https://github.com/tobymao/sqlglot/pull/5669) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
165
|
+
- [`56588c7`](https://github.com/tobymao/sqlglot/commit/56588c7e22b4db4f0e44696a460483ca1e549163) - **bigquery**: Add support for vector_search function. Move predict to BigQuery dialect. *(PR [#5660](https://github.com/tobymao/sqlglot/pull/5660) by [@rloredo](https://github.com/rloredo))*
|
|
166
|
+
- [`f0d2cc2`](https://github.com/tobymao/sqlglot/commit/f0d2cc2b0f72340172ecd154f632aa6a24c15512) - **singlestore**: Fixed generation of exp.LogicalAnd *(PR [#5671](https://github.com/tobymao/sqlglot/pull/5671) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
167
|
+
- [`a688a0f`](https://github.com/tobymao/sqlglot/commit/a688a0f0d70f87139e531d1419b338b695bec384) - **optimizer**: parse and annotate type for bigquery APPROX_TOP_COUNT *(PR [#5670](https://github.com/tobymao/sqlglot/pull/5670) by [@geooo109](https://github.com/geooo109))*
|
|
168
|
+
- [`fa8d571`](https://github.com/tobymao/sqlglot/commit/fa8d57132b1d21d92eb5de3ba88b41f880e14889) - **singlestore**: Fixed generation/parsing of exp.ApproxQuantile *(PR [#5672](https://github.com/tobymao/sqlglot/pull/5672) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
169
|
+
- [`9955ebe`](https://github.com/tobymao/sqlglot/commit/9955ebe90d3421815738ecb643806add755c5df3) - **singlestore**: Fixed parsing/generation of exp.Variance *(PR [#5673](https://github.com/tobymao/sqlglot/pull/5673) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
170
|
+
- [`3c93fcc`](https://github.com/tobymao/sqlglot/commit/3c93fcce96ec82e78753f6c9dd5fb0e730a82058) - **optimizer**: parse and annotate type for bigquery APPROX_TOP_SUM *(PR [#5675](https://github.com/tobymao/sqlglot/pull/5675) by [@geooo109](https://github.com/geooo109))*
|
|
171
|
+
- [`60cbb9d`](https://github.com/tobymao/sqlglot/commit/60cbb9d0e3c9b5a36c1368c9b5bb05def8ce8658) - **dremio**: add CURRENT_DATE_UTC *(PR [#5674](https://github.com/tobymao/sqlglot/pull/5674) by [@jasonthomassql](https://github.com/jasonthomassql))*
|
|
172
|
+
- :arrow_lower_right: *addresses issue [#5655](https://github.com/tobymao/sqlglot/issues/5655) opened by [@jasonthomassql](https://github.com/jasonthomassql)*
|
|
173
|
+
- [`741d45a`](https://github.com/tobymao/sqlglot/commit/741d45a0ca7c1bad67da4393cd10cc9cfa49ea68) - **optimizer**: parse and annotate type for bigquery FROM/TO_BASE32 *(PR [#5676](https://github.com/tobymao/sqlglot/pull/5676) by [@geooo109](https://github.com/geooo109))*
|
|
174
|
+
- [`9ae045c`](https://github.com/tobymao/sqlglot/commit/9ae045c0405e43b148e3b9261825288ebf09100c) - **optimizer**: parse and annotate type for bigquery FROM_HEX *(PR [#5679](https://github.com/tobymao/sqlglot/pull/5679) by [@geooo109](https://github.com/geooo109))*
|
|
175
|
+
- [`5a22a25`](https://github.com/tobymao/sqlglot/commit/5a22a254143978989027f6e7f6163019a34f112a) - **optimizer**: annotate type for bigquery TO_HEX *(PR [#5680](https://github.com/tobymao/sqlglot/pull/5680) by [@geooo109](https://github.com/geooo109))*
|
|
176
|
+
- [`d920ac3`](https://github.com/tobymao/sqlglot/commit/d920ac3886ce006d76616bc31884ee2f5c4162bc) - **singlestore**: Fixed parsing/generation of exp.RegexpExtractAll *(PR [#5692](https://github.com/tobymao/sqlglot/pull/5692) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
177
|
+
- [`260c72b`](https://github.com/tobymao/sqlglot/commit/260c72befc0510ebe1d007284c0eef9343de20d7) - **singlestore**: Fixed parsing/generation of exp.Contains *(PR [#5684](https://github.com/tobymao/sqlglot/pull/5684) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
178
|
+
- [`081dc67`](https://github.com/tobymao/sqlglot/commit/081dc673b89d3d8d0709b29e359142297ff64536) - **singlestore**: Fixed generaion/parsing of exp.VariancePop *(PR [#5682](https://github.com/tobymao/sqlglot/pull/5682) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
179
|
+
- [`eb538bf`](https://github.com/tobymao/sqlglot/commit/eb538bf225645d0a54d614733e447c13cf91a37a) - **singlestore**: Fixed generation of exp.Chr *(PR [#5683](https://github.com/tobymao/sqlglot/pull/5683) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
180
|
+
- [`32d9dd1`](https://github.com/tobymao/sqlglot/commit/32d9dd1309ce0876114f57993596c4456aa1d50f) - **singlestore**: Fixed exp.MD5Digest generation *(PR [#5688](https://github.com/tobymao/sqlglot/pull/5688) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
181
|
+
- [`5c1eb2d`](https://github.com/tobymao/sqlglot/commit/5c1eb2df5dd3dcc6ed2c8204cec56b5c3d276f87) - **optimizer**: parse and annotate type for bq PARSE_BIG/NUMERIC *(PR [#5690](https://github.com/tobymao/sqlglot/pull/5690) by [@geooo109](https://github.com/geooo109))*
|
|
182
|
+
- [`6f88500`](https://github.com/tobymao/sqlglot/commit/6f885007a075339cf20034459571a6ae821c61c0) - **singlestore**: Fixed exp.IsAscii generation *(PR [#5687](https://github.com/tobymao/sqlglot/pull/5687) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
183
|
+
- [`311373d`](https://github.com/tobymao/sqlglot/commit/311373d22134de906d1c1cef019541e85e2f7c9f) - **optimizer**: parse and annotate type for bq CODE_POINTS_TO_BYTES *(PR [#5686](https://github.com/tobymao/sqlglot/pull/5686) by [@geooo109](https://github.com/geooo109))*
|
|
184
|
+
- [`79d9de1`](https://github.com/tobymao/sqlglot/commit/79d9de1745598f8f3ae2c82c1389dd455c946a09) - **optimizer**: parse and annotate type for bq TO_CODE_POINTS *(PR [#5685](https://github.com/tobymao/sqlglot/pull/5685) by [@geooo109](https://github.com/geooo109))*
|
|
185
|
+
- [`5df3ea9`](https://github.com/tobymao/sqlglot/commit/5df3ea92f59125955124ea1883b777b489db3042) - **optimizer**: parse and annotate type for bq SAFE_CONVERT_BYTES_TO_STRING *(PR [#5681](https://github.com/tobymao/sqlglot/pull/5681) by [@geooo109](https://github.com/geooo109))*
|
|
186
|
+
- [`c832746`](https://github.com/tobymao/sqlglot/commit/c832746018fbc2c531d5b2a7c7f8cd5d78e511ff) - **optimizer**: parse and annotate type for bigquery APPROX_QUANTILES *(PR [#5678](https://github.com/tobymao/sqlglot/pull/5678) by [@geooo109](https://github.com/geooo109))*
|
|
187
|
+
- [`8fa5ae8`](https://github.com/tobymao/sqlglot/commit/8fa5ae8a61c698abaea265b4950390ea3ddfa7e9) - **singlestore**: Fixed generation/parsing of exp.RegexpExtract *(PR [#5691](https://github.com/tobymao/sqlglot/pull/5691) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
188
|
+
- [`d6d409a`](https://github.com/tobymao/sqlglot/commit/d6d409a548042063f80d02dfaf5b61a0096d1d50) - **singlestore**: Fixed generaion of exp.Repeat *(PR [#5693](https://github.com/tobymao/sqlglot/pull/5693) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
189
|
+
- [`b7db08b`](https://github.com/tobymao/sqlglot/commit/b7db08b96c7d7d02ec54f26b8749b3d57f021d8b) - **singlestore**: Fixed generation of exp.StartsWith *(PR [#5694](https://github.com/tobymao/sqlglot/pull/5694) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
190
|
+
- [`87b04ef`](https://github.com/tobymao/sqlglot/commit/87b04ef0fc2df5064be9e6b75b264cff0639face) - **singlestore**: Fixed generation of exp.FromBase *(PR [#5695](https://github.com/tobymao/sqlglot/pull/5695) by [@AdalbertMemSQL](https://github.com/AdalbertMemSQL))*
|
|
191
|
+
- [`9c1d0fd`](https://github.com/tobymao/sqlglot/commit/9c1d0fdac9acd3fb3109ca3d3cae9c9ffaed1a7d) - **duckdb**: transpile array unique aggregation closes [#5689](https://github.com/tobymao/sqlglot/pull/5689) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
192
|
+
- [`99e169e`](https://github.com/tobymao/sqlglot/commit/99e169ea13d5be3712a47f6b55b98a4764a3c24d) - **optimizer**: parse and annotate type for bq BOOL *(PR [#5697](https://github.com/tobymao/sqlglot/pull/5697) by [@geooo109](https://github.com/geooo109))*
|
|
193
|
+
- [`3f31770`](https://github.com/tobymao/sqlglot/commit/3f31770c793f464fcac1ce2b8dfa03d4b7f0231c) - **optimizer**: parse and annotate type for bq FLOAT64 *(PR [#5700](https://github.com/tobymao/sqlglot/pull/5700) by [@geooo109](https://github.com/geooo109))*
|
|
194
|
+
|
|
195
|
+
### :bug: Bug Fixes
|
|
196
|
+
- [`f1269f5`](https://github.com/tobymao/sqlglot/commit/f1269f5ecfccfee4cdeeda5bfd10eb1c47994fad) - **tsql**: do not attach limit modifier to set operation *(PR [#5609](https://github.com/tobymao/sqlglot/pull/5609) by [@georgesittas](https://github.com/georgesittas))*
|
|
197
|
+
- [`a6edf8e`](https://github.com/tobymao/sqlglot/commit/a6edf8ee3273a7736ed801ef8dea302613b119da) - **tsql**: Remove ORDER from set op modifiers too *(PR [#5626](https://github.com/tobymao/sqlglot/pull/5626) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
198
|
+
- :arrow_lower_right: *fixes issue [#5618](https://github.com/tobymao/sqlglot/issues/5618) opened by [@MQMMMQM](https://github.com/MQMMMQM)*
|
|
199
|
+
- [`ce5840e`](https://github.com/tobymao/sqlglot/commit/ce5840ed615e162a93cd911ab6207160878fcc64) - **exasol**: update several dialect properties to correctly reflect semantics *(PR [#5642](https://github.com/tobymao/sqlglot/pull/5642) by [@nnamdi16](https://github.com/nnamdi16))*
|
|
200
|
+
- [`3ab1d44`](https://github.com/tobymao/sqlglot/commit/3ab1d4487279cab3be2d3764e51516c6db21629d) - **generator**: Wrap CONCAT items with COALESCE less aggressively *(PR [#5641](https://github.com/tobymao/sqlglot/pull/5641) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
201
|
+
- [`045d2f0`](https://github.com/tobymao/sqlglot/commit/045d2f02649b0e6dc178c079e4e0db201ed9bf08) - **duckdb**: Transpile Spark's FIRST(col, TRUE) *(PR [#5644](https://github.com/tobymao/sqlglot/pull/5644) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
202
|
+
- :arrow_lower_right: *fixes issue [#5643](https://github.com/tobymao/sqlglot/issues/5643) opened by [@michal-clutch](https://github.com/michal-clutch)*
|
|
203
|
+
|
|
204
|
+
### :wrench: Chores
|
|
205
|
+
- [`4c04c0c`](https://github.com/tobymao/sqlglot/commit/4c04c0ce859ab8314ed36fb8779f14c0fc2f1094) - use a valid SPDX identifier as license classifier *(PR [#5606](https://github.com/tobymao/sqlglot/pull/5606) by [@ecederstrand](https://github.com/ecederstrand))*
|
|
206
|
+
- [`249f638`](https://github.com/tobymao/sqlglot/commit/249f638877ddd2a1732d1e6bc859793f3bc0622d) - add table to document dialect support level *(PR [#5628](https://github.com/tobymao/sqlglot/pull/5628) by [@georgesittas](https://github.com/georgesittas))*
|
|
207
|
+
- [`3357125`](https://github.com/tobymao/sqlglot/commit/33571250d172d64a3e0450738b3ad330e5c0a795) - **doris**: refactor unique key prop generation *(PR [#5625](https://github.com/tobymao/sqlglot/pull/5625) by [@georgesittas](https://github.com/georgesittas))*
|
|
208
|
+
- [`545f1ac`](https://github.com/tobymao/sqlglot/commit/545f1acd76bdc4e537209266984137f6c69ce622) - Clean up of PR5614 *(PR [#5648](https://github.com/tobymao/sqlglot/pull/5648) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
209
|
+
|
|
210
|
+
|
|
4
211
|
## [v27.8.0] - 2025-08-19
|
|
5
212
|
### :boom: BREAKING CHANGES
|
|
6
213
|
- due to [`2a33339`](https://github.com/tobymao/sqlglot/commit/2a333395cde71936df911488afcff92cae735e11) - annotate type for bigquery REPLACE *(PR [#5572](https://github.com/tobymao/sqlglot/pull/5572) by [@geooo109](https://github.com/geooo109))*:
|
|
@@ -6604,3 +6811,5 @@ Changelog
|
|
|
6604
6811
|
[v27.6.0]: https://github.com/tobymao/sqlglot/compare/v27.5.1...v27.6.0
|
|
6605
6812
|
[v27.7.0]: https://github.com/tobymao/sqlglot/compare/v27.6.0...v27.7.0
|
|
6606
6813
|
[v27.8.0]: https://github.com/tobymao/sqlglot/compare/v27.7.0...v27.8.0
|
|
6814
|
+
[v27.9.0]: https://github.com/tobymao/sqlglot/compare/v27.8.0...v27.9.0
|
|
6815
|
+
[v27.10.0]: https://github.com/tobymao/sqlglot/compare/v27.9.0...v27.10.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 27.
|
|
3
|
+
Version: 27.11.0
|
|
4
4
|
Summary: An easily customizable SQL parser and transpiler
|
|
5
5
|
Author-email: Toby Mao <toby.mao@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -33,7 +33,7 @@ Requires-Dist: typing_extensions; extra == "dev"
|
|
|
33
33
|
Requires-Dist: maturin<2.0,>=1.4; extra == "dev"
|
|
34
34
|
Requires-Dist: pyperf; extra == "dev"
|
|
35
35
|
Provides-Extra: rs
|
|
36
|
-
Requires-Dist: sqlglotrs==0.6.
|
|
36
|
+
Requires-Dist: sqlglotrs==0.6.2; extra == "rs"
|
|
37
37
|
Dynamic: license-file
|
|
38
38
|
Dynamic: provides-extra
|
|
39
39
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '27.
|
|
32
|
-
__version_tuple__ = version_tuple = (27,
|
|
31
|
+
__version__ = version = '27.11.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (27, 11, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g41521e31b'
|
|
@@ -4,6 +4,9 @@ import logging
|
|
|
4
4
|
import re
|
|
5
5
|
import typing as t
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
from sqlglot.optimizer.annotate_types import TypeAnnotator
|
|
9
|
+
|
|
7
10
|
from sqlglot import exp, generator, jsonpath, parser, tokens, transforms
|
|
8
11
|
from sqlglot._typing import E
|
|
9
12
|
from sqlglot.dialects.dialect import (
|
|
@@ -172,6 +175,18 @@ def _build_to_hex(args: t.List) -> exp.Hex | exp.MD5:
|
|
|
172
175
|
return exp.MD5(this=arg.this) if isinstance(arg, exp.MD5Digest) else exp.LowerHex(this=arg)
|
|
173
176
|
|
|
174
177
|
|
|
178
|
+
def _build_json_strip_nulls(args: t.List) -> exp.JSONStripNulls:
|
|
179
|
+
expression = exp.JSONStripNulls(this=seq_get(args, 0))
|
|
180
|
+
|
|
181
|
+
for arg in args[1:]:
|
|
182
|
+
if isinstance(arg, exp.Kwarg):
|
|
183
|
+
expression.set(arg.this.name.lower(), arg)
|
|
184
|
+
else:
|
|
185
|
+
expression.set("expression", arg)
|
|
186
|
+
|
|
187
|
+
return expression
|
|
188
|
+
|
|
189
|
+
|
|
175
190
|
def _array_contains_sql(self: BigQuery.Generator, expression: exp.ArrayContains) -> str:
|
|
176
191
|
return self.sql(
|
|
177
192
|
exp.Exists(
|
|
@@ -295,6 +310,24 @@ def _annotate_math_functions(self: TypeAnnotator, expression: E) -> E:
|
|
|
295
310
|
return expression
|
|
296
311
|
|
|
297
312
|
|
|
313
|
+
def _annotate_perncentile_cont(
|
|
314
|
+
self: TypeAnnotator, expression: exp.PercentileCont
|
|
315
|
+
) -> exp.PercentileCont:
|
|
316
|
+
"""
|
|
317
|
+
+------------+-----------+------------+---------+
|
|
318
|
+
| INPUT | NUMERIC | BIGNUMERIC | FLOAT64 |
|
|
319
|
+
+------------+-----------+------------+---------+
|
|
320
|
+
| NUMERIC | NUMERIC | BIGNUMERIC | FLOAT64 |
|
|
321
|
+
| BIGNUMERIC | BIGNUMERIC| BIGNUMERIC | FLOAT64 |
|
|
322
|
+
| FLOAT64 | FLOAT64 | FLOAT64 | FLOAT64 |
|
|
323
|
+
+------------+-----------+------------+---------+
|
|
324
|
+
"""
|
|
325
|
+
self._annotate_args(expression)
|
|
326
|
+
|
|
327
|
+
self._set_type(expression, self._maybe_coerce(expression.this.type, expression.expression.type))
|
|
328
|
+
return expression
|
|
329
|
+
|
|
330
|
+
|
|
298
331
|
def _annotate_by_args_approx_top(self: TypeAnnotator, expression: exp.ApproxTopK) -> exp.ApproxTopK:
|
|
299
332
|
self._annotate_args(expression)
|
|
300
333
|
|
|
@@ -340,16 +373,13 @@ def _build_format_time(expr_type: t.Type[exp.Expression]) -> t.Callable[[t.List]
|
|
|
340
373
|
return _builder
|
|
341
374
|
|
|
342
375
|
|
|
343
|
-
def _build_contains_substring(args: t.List) -> exp.Contains
|
|
344
|
-
if len(args) == 3:
|
|
345
|
-
return exp.Anonymous(this="CONTAINS_SUBSTR", expressions=args)
|
|
346
|
-
|
|
376
|
+
def _build_contains_substring(args: t.List) -> exp.Contains:
|
|
347
377
|
# Lowercase the operands in case of transpilation, as exp.Contains
|
|
348
378
|
# is case-sensitive on other dialects
|
|
349
379
|
this = exp.Lower(this=seq_get(args, 0))
|
|
350
380
|
expr = exp.Lower(this=seq_get(args, 1))
|
|
351
381
|
|
|
352
|
-
return exp.Contains(this=this, expression=expr)
|
|
382
|
+
return exp.Contains(this=this, expression=expr, json_scope=seq_get(args, 2))
|
|
353
383
|
|
|
354
384
|
|
|
355
385
|
def _json_extract_sql(self: BigQuery.Generator, expression: JSON_EXTRACT_TYPE) -> str:
|
|
@@ -456,6 +486,13 @@ class BigQuery(Dialect):
|
|
|
456
486
|
# All set operations require either a DISTINCT or ALL specifier
|
|
457
487
|
SET_OP_DISTINCT_BY_DEFAULT = dict.fromkeys((exp.Except, exp.Intersect, exp.Union), None)
|
|
458
488
|
|
|
489
|
+
# https://cloud.google.com/bigquery/docs/reference/standard-sql/navigation_functions#percentile_cont
|
|
490
|
+
COERCES_TO = {
|
|
491
|
+
**TypeAnnotator.COERCES_TO,
|
|
492
|
+
exp.DataType.Type.BIGDECIMAL: {exp.DataType.Type.DOUBLE},
|
|
493
|
+
}
|
|
494
|
+
COERCES_TO[exp.DataType.Type.DECIMAL] |= {exp.DataType.Type.BIGDECIMAL}
|
|
495
|
+
|
|
459
496
|
# BigQuery maps Type.TIMESTAMP to DATETIME, so we need to amend the inferred types
|
|
460
497
|
TYPE_TO_EXPRESSIONS = {
|
|
461
498
|
**Dialect.TYPE_TO_EXPRESSIONS,
|
|
@@ -497,7 +534,6 @@ class BigQuery(Dialect):
|
|
|
497
534
|
exp.Array: _annotate_array,
|
|
498
535
|
exp.ArrayConcat: lambda self, e: self._annotate_by_args(e, "this", "expressions"),
|
|
499
536
|
exp.Ascii: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
500
|
-
exp.JSONBool: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
501
537
|
exp.BitwiseAndAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
502
538
|
exp.BitwiseOrAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
503
539
|
exp.BitwiseXorAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
@@ -511,38 +547,72 @@ class BigQuery(Dialect):
|
|
|
511
547
|
e, exp.DataType.Type.VARCHAR
|
|
512
548
|
),
|
|
513
549
|
exp.Concat: _annotate_concat,
|
|
550
|
+
exp.Contains: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
514
551
|
exp.Corr: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
515
552
|
exp.CovarPop: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
516
553
|
exp.CovarSamp: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
554
|
+
exp.CumeDist: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
517
555
|
exp.DateFromUnixDate: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DATE),
|
|
518
556
|
exp.DateTrunc: lambda self, e: self._annotate_by_args(e, "this"),
|
|
557
|
+
exp.DenseRank: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
519
558
|
exp.FarmFingerprint: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
559
|
+
exp.FirstValue: lambda self, e: self._annotate_by_args(e, "this"),
|
|
520
560
|
exp.Unhex: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BINARY),
|
|
521
561
|
exp.Float64: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
562
|
+
exp.Format: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
522
563
|
exp.GenerateTimestampArray: lambda self, e: self._annotate_with_type(
|
|
523
564
|
e, exp.DataType.build("ARRAY<TIMESTAMP>", dialect="bigquery")
|
|
524
565
|
),
|
|
525
566
|
exp.Grouping: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
567
|
+
exp.IgnoreNulls: lambda self, e: self._annotate_by_args(e, "this"),
|
|
526
568
|
exp.JSONArray: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
569
|
+
exp.JSONArrayAppend: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
570
|
+
exp.JSONArrayInsert: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
571
|
+
exp.JSONBool: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
527
572
|
exp.JSONExtractScalar: lambda self, e: self._annotate_with_type(
|
|
528
573
|
e, exp.DataType.Type.VARCHAR
|
|
529
574
|
),
|
|
530
|
-
exp.
|
|
531
|
-
|
|
575
|
+
exp.JSONExtract: lambda self, e: self._annotate_by_args(e, "this"),
|
|
576
|
+
exp.JSONExtractArray: lambda self, e: self._annotate_by_args(e, "this", array=True),
|
|
577
|
+
exp.JSONFormat: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
578
|
+
exp.JSONKeysAtDepth: lambda self, e: self._annotate_with_type(
|
|
579
|
+
e, exp.DataType.build("ARRAY<VARCHAR>", dialect="bigquery")
|
|
532
580
|
),
|
|
581
|
+
exp.JSONObject: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
582
|
+
exp.JSONRemove: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
583
|
+
exp.JSONSet: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
584
|
+
exp.JSONStripNulls: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
533
585
|
exp.JSONType: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
586
|
+
exp.JSONValueArray: lambda self, e: self._annotate_with_type(
|
|
587
|
+
e, exp.DataType.build("ARRAY<VARCHAR>", dialect="bigquery")
|
|
588
|
+
),
|
|
534
589
|
exp.Lag: lambda self, e: self._annotate_by_args(e, "this", "default"),
|
|
590
|
+
exp.Lead: lambda self, e: self._annotate_by_args(e, "this"),
|
|
535
591
|
exp.LowerHex: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
592
|
+
exp.LaxBool: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
593
|
+
exp.LaxFloat64: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
594
|
+
exp.LaxInt64: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
595
|
+
exp.LaxString: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
536
596
|
exp.MD5Digest: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BINARY),
|
|
597
|
+
exp.Normalize: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
598
|
+
exp.NthValue: lambda self, e: self._annotate_by_args(e, "this"),
|
|
599
|
+
exp.Ntile: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
537
600
|
exp.ParseTime: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.TIME),
|
|
538
601
|
exp.ParseDatetime: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DATETIME),
|
|
539
602
|
exp.ParseBignumeric: lambda self, e: self._annotate_with_type(
|
|
540
603
|
e, exp.DataType.Type.BIGDECIMAL
|
|
541
604
|
),
|
|
542
605
|
exp.ParseNumeric: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DECIMAL),
|
|
606
|
+
exp.PercentileCont: lambda self, e: _annotate_perncentile_cont(self, e),
|
|
607
|
+
exp.PercentileDisc: lambda self, e: self._annotate_by_args(e, "this"),
|
|
608
|
+
exp.PercentRank: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
609
|
+
exp.Rank: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
543
610
|
exp.RegexpExtractAll: lambda self, e: self._annotate_by_args(e, "this", array=True),
|
|
611
|
+
exp.RegexpInstr: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
544
612
|
exp.Replace: lambda self, e: self._annotate_by_args(e, "this"),
|
|
613
|
+
exp.RespectNulls: lambda self, e: self._annotate_by_args(e, "this"),
|
|
545
614
|
exp.Reverse: lambda self, e: self._annotate_by_args(e, "this"),
|
|
615
|
+
exp.RowNumber: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
546
616
|
exp.SafeConvertBytesToString: lambda self, e: self._annotate_with_type(
|
|
547
617
|
e, exp.DataType.Type.VARCHAR
|
|
548
618
|
),
|
|
@@ -683,12 +753,19 @@ class BigQuery(Dialect):
|
|
|
683
753
|
"GENERATE_ARRAY": exp.GenerateSeries.from_arg_list,
|
|
684
754
|
"JSON_EXTRACT_SCALAR": _build_extract_json_with_default_path(exp.JSONExtractScalar),
|
|
685
755
|
"JSON_EXTRACT_ARRAY": _build_extract_json_with_default_path(exp.JSONExtractArray),
|
|
756
|
+
"JSON_EXTRACT_STRING_ARRAY": _build_extract_json_with_default_path(exp.JSONValueArray),
|
|
757
|
+
"JSON_KEYS": exp.JSONKeysAtDepth.from_arg_list,
|
|
686
758
|
"JSON_QUERY": parser.build_extract_json_with_path(exp.JSONExtract),
|
|
687
759
|
"JSON_QUERY_ARRAY": _build_extract_json_with_default_path(exp.JSONExtractArray),
|
|
760
|
+
"JSON_STRIP_NULLS": _build_json_strip_nulls,
|
|
688
761
|
"JSON_VALUE": _build_extract_json_with_default_path(exp.JSONExtractScalar),
|
|
689
762
|
"JSON_VALUE_ARRAY": _build_extract_json_with_default_path(exp.JSONValueArray),
|
|
690
763
|
"LENGTH": lambda args: exp.Length(this=seq_get(args, 0), binary=True),
|
|
691
764
|
"MD5": exp.MD5Digest.from_arg_list,
|
|
765
|
+
"NORMALIZE_AND_CASEFOLD": lambda args: exp.Normalize(
|
|
766
|
+
this=seq_get(args, 0), form=seq_get(args, 1), is_casefold=True
|
|
767
|
+
),
|
|
768
|
+
"OCTET_LENGTH": exp.ByteLength.from_arg_list,
|
|
692
769
|
"TO_HEX": _build_to_hex,
|
|
693
770
|
"PARSE_DATE": lambda args: build_formatted_time(exp.StrToDate, "bigquery")(
|
|
694
771
|
[seq_get(args, 1), seq_get(args, 0)]
|
|
@@ -795,9 +872,13 @@ class BigQuery(Dialect):
|
|
|
795
872
|
"SAFE_ORDINAL": (1, True),
|
|
796
873
|
}
|
|
797
874
|
|
|
798
|
-
def _parse_for_in(self) -> exp.ForIn:
|
|
875
|
+
def _parse_for_in(self) -> t.Union[exp.ForIn, exp.Command]:
|
|
876
|
+
index = self._index
|
|
799
877
|
this = self._parse_range()
|
|
800
878
|
self._match_text_seq("DO")
|
|
879
|
+
if self._match(TokenType.COMMAND):
|
|
880
|
+
self._retreat(index)
|
|
881
|
+
return self._parse_as_command(self._prev)
|
|
801
882
|
return self.expression(exp.ForIn, this=this, expression=self._parse_statement())
|
|
802
883
|
|
|
803
884
|
def _parse_table_part(self, schema: bool = False) -> t.Optional[exp.Expression]:
|
|
@@ -1155,6 +1236,7 @@ class BigQuery(Dialect):
|
|
|
1155
1236
|
exp.ArrayContains: _array_contains_sql,
|
|
1156
1237
|
exp.ArrayFilter: filter_array_using_unnest,
|
|
1157
1238
|
exp.ArrayRemove: filter_array_using_unnest,
|
|
1239
|
+
exp.ByteLength: rename_func("BYTE_LENGTH"),
|
|
1158
1240
|
exp.Cast: transforms.preprocess([transforms.remove_precision_parameterized_types]),
|
|
1159
1241
|
exp.CollateProperty: lambda self, e: (
|
|
1160
1242
|
f"DEFAULT COLLATE {self.sql(e, 'this')}"
|
|
@@ -1193,11 +1275,18 @@ class BigQuery(Dialect):
|
|
|
1193
1275
|
exp.JSONExtractArray: _json_extract_sql,
|
|
1194
1276
|
exp.JSONExtractScalar: _json_extract_sql,
|
|
1195
1277
|
exp.JSONFormat: rename_func("TO_JSON_STRING"),
|
|
1278
|
+
exp.JSONKeysAtDepth: rename_func("JSON_KEYS"),
|
|
1279
|
+
exp.JSONValueArray: rename_func("JSON_VALUE_ARRAY"),
|
|
1196
1280
|
exp.Levenshtein: _levenshtein_sql,
|
|
1197
1281
|
exp.Max: max_or_greatest,
|
|
1198
1282
|
exp.MD5: lambda self, e: self.func("TO_HEX", self.func("MD5", e.this)),
|
|
1199
1283
|
exp.MD5Digest: rename_func("MD5"),
|
|
1200
1284
|
exp.Min: min_or_least,
|
|
1285
|
+
exp.Normalize: lambda self, e: self.func(
|
|
1286
|
+
"NORMALIZE_AND_CASEFOLD" if e.args.get("is_casefold") else "NORMALIZE",
|
|
1287
|
+
e.this,
|
|
1288
|
+
e.args.get("form"),
|
|
1289
|
+
),
|
|
1201
1290
|
exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
|
|
1202
1291
|
exp.RegexpExtract: lambda self, e: self.func(
|
|
1203
1292
|
"REGEXP_EXTRACT",
|
|
@@ -1533,7 +1622,7 @@ class BigQuery(Dialect):
|
|
|
1533
1622
|
this = this.this
|
|
1534
1623
|
expr = expr.this
|
|
1535
1624
|
|
|
1536
|
-
return self.func("CONTAINS_SUBSTR", this, expr)
|
|
1625
|
+
return self.func("CONTAINS_SUBSTR", this, expr, expression.args.get("json_scope"))
|
|
1537
1626
|
|
|
1538
1627
|
def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str] = None) -> str:
|
|
1539
1628
|
this = expression.this
|
|
@@ -74,6 +74,27 @@ def build_date_delta_with_cast_interval(
|
|
|
74
74
|
return _builder
|
|
75
75
|
|
|
76
76
|
|
|
77
|
+
def datetype_handler(args: t.List[exp.Expression], dialect: DialectType) -> exp.Expression:
|
|
78
|
+
year, month, day = args
|
|
79
|
+
|
|
80
|
+
if all(isinstance(arg, exp.Literal) and arg.is_int for arg in (year, month, day)):
|
|
81
|
+
date_str = f"{int(year.this):04d}-{int(month.this):02d}-{int(day.this):02d}"
|
|
82
|
+
return exp.Date(this=exp.Literal.string(date_str))
|
|
83
|
+
|
|
84
|
+
return exp.Cast(
|
|
85
|
+
this=exp.Concat(
|
|
86
|
+
expressions=[
|
|
87
|
+
year,
|
|
88
|
+
exp.Literal.string("-"),
|
|
89
|
+
month,
|
|
90
|
+
exp.Literal.string("-"),
|
|
91
|
+
day,
|
|
92
|
+
]
|
|
93
|
+
),
|
|
94
|
+
to=exp.DataType.build("DATE"),
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
77
98
|
class Dremio(Dialect):
|
|
78
99
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
79
100
|
CONCAT_COALESCE = True
|
|
@@ -145,12 +166,16 @@ class Dremio(Dialect):
|
|
|
145
166
|
|
|
146
167
|
FUNCTIONS = {
|
|
147
168
|
**parser.Parser.FUNCTIONS,
|
|
148
|
-
"
|
|
149
|
-
"DATE_FORMAT": build_formatted_time(exp.TimeToStr, "dremio"),
|
|
150
|
-
"TO_DATE": build_formatted_time(exp.TsOrDsToDate, "dremio"),
|
|
169
|
+
"ARRAY_GENERATE_RANGE": exp.GenerateSeries.from_arg_list,
|
|
151
170
|
"DATE_ADD": build_date_delta_with_cast_interval(exp.DateAdd),
|
|
171
|
+
"DATE_FORMAT": build_formatted_time(exp.TimeToStr, "dremio"),
|
|
152
172
|
"DATE_SUB": build_date_delta_with_cast_interval(exp.DateSub),
|
|
153
|
-
"
|
|
173
|
+
"REGEXP_MATCHES": exp.RegexpLike.from_arg_list,
|
|
174
|
+
"REPEATSTR": exp.Repeat.from_arg_list,
|
|
175
|
+
"TO_CHAR": to_char_is_numeric_handler,
|
|
176
|
+
"TO_DATE": build_formatted_time(exp.TsOrDsToDate, "dremio"),
|
|
177
|
+
"DATE_PART": exp.Extract.from_arg_list,
|
|
178
|
+
"DATETYPE": datetype_handler,
|
|
154
179
|
}
|
|
155
180
|
|
|
156
181
|
def _parse_current_date_utc(self) -> exp.Cast:
|
|
@@ -345,7 +345,6 @@ class Postgres(Dialect):
|
|
|
345
345
|
"REFRESH": TokenType.COMMAND,
|
|
346
346
|
"REINDEX": TokenType.COMMAND,
|
|
347
347
|
"RESET": TokenType.COMMAND,
|
|
348
|
-
"REVOKE": TokenType.COMMAND,
|
|
349
348
|
"SERIAL": TokenType.SERIAL,
|
|
350
349
|
"SMALLSERIAL": TokenType.SMALLSERIAL,
|
|
351
350
|
"TEMP": TokenType.TEMPORARY,
|