sqlglot 27.9.0__tar.gz → 27.10.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.10.0}/CHANGELOG.md +170 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/PKG-INFO +1 -1
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/_version.py +3 -3
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/bigquery.py +16 -7
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/postgres.py +0 -1
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/singlestore.py +20 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/expressions.py +8 -3
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/generator.py +31 -3
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/scope.py +1 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/parser.py +40 -3
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/tokens.py +2 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.egg-info/PKG-INFO +1 -1
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_bigquery.py +11 -3
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_clickhouse.py +4 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_databricks.py +8 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_mysql.py +15 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_oracle.py +18 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_postgres.py +75 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_redshift.py +19 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_singlestore.py +27 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_snowflake.py +17 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_tsql.py +4 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/identity.sql +6 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/annotate_functions.sql +28 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/qualify_columns.sql +4 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/.gitignore +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/.gitpod.yml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/CONTRIBUTING.md +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/LICENSE +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/MANIFEST.in +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/Makefile +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/README.md +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/pyproject.toml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/setup.cfg +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/setup.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/__main__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/_typing.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/dialect.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/diff.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/errors.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/helper.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/lineage.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/merge_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/qualify_columns.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/simplify.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/planner.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/py.typed +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/schema.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/serde.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/time.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/transforms.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot/trie.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.egg-info/SOURCES.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.egg-info/requires.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglot.png +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/Cargo.lock +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/Cargo.toml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/benches/dialect_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/benches/long.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/benches/token_type_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/benches/tokenizer_dialect_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/benches/tokenizer_settings.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/pyproject.toml +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/src/lib.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/src/settings.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/src/token.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/src/tokenizer.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/sqlglotrs/src/trie.rs +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_dialect.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_duckdb.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_spark.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_sqlite.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/helpers.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_build.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_diff.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_docs.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_executor.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_expressions.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_generator.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_helper.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_lineage.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_optimizer.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_parser.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_schema.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_serde.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_time.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_tokens.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_transforms.py +0 -0
- {sqlglot-27.9.0 → sqlglot-27.10.0}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,175 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v27.9.0] - 2025-08-27
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- 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))*:
|
|
7
|
+
|
|
8
|
+
raise if query modifier is specified multiple times (#5608)
|
|
9
|
+
|
|
10
|
+
- 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))*:
|
|
11
|
+
|
|
12
|
+
parse LIST_FILTER into ArrayFilter closes #5633
|
|
13
|
+
|
|
14
|
+
- 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))*:
|
|
15
|
+
|
|
16
|
+
parse LIST_TRANSFORM into Transform closes #5634
|
|
17
|
+
|
|
18
|
+
- 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))*:
|
|
19
|
+
|
|
20
|
+
Wrap CONCAT items with COALESCE less aggressively (#5641)
|
|
21
|
+
|
|
22
|
+
- 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))*:
|
|
23
|
+
|
|
24
|
+
Qualify columns generated by exp.Aliases (#5647)
|
|
25
|
+
|
|
26
|
+
- 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))*:
|
|
27
|
+
|
|
28
|
+
support alter table with check closes #5649
|
|
29
|
+
|
|
30
|
+
- 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))*:
|
|
31
|
+
|
|
32
|
+
Added parsing/generation of JSON_ARRAY_CONTAINS function (#5661)
|
|
33
|
+
|
|
34
|
+
- 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))*:
|
|
35
|
+
|
|
36
|
+
add parse and annotate type for bigquery FARM_FINGERPRINT (#5667)
|
|
37
|
+
|
|
38
|
+
- 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))*:
|
|
39
|
+
|
|
40
|
+
Add support for vector_search function. Move predict to BigQuery dialect. (#5660)
|
|
41
|
+
|
|
42
|
+
- 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))*:
|
|
43
|
+
|
|
44
|
+
parse and annotate type for bigquery APPROX_TOP_COUNT (#5670)
|
|
45
|
+
|
|
46
|
+
- 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))*:
|
|
47
|
+
|
|
48
|
+
parse and annotate type for bigquery APPROX_TOP_SUM (#5675)
|
|
49
|
+
|
|
50
|
+
- 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))*:
|
|
51
|
+
|
|
52
|
+
parse and annotate type for bigquery FROM/TO_BASE32 (#5676)
|
|
53
|
+
|
|
54
|
+
- 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))*:
|
|
55
|
+
|
|
56
|
+
parse and annotate type for bigquery FROM_HEX (#5679)
|
|
57
|
+
|
|
58
|
+
- 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))*:
|
|
59
|
+
|
|
60
|
+
annotate type for bigquery TO_HEX (#5680)
|
|
61
|
+
|
|
62
|
+
- 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))*:
|
|
63
|
+
|
|
64
|
+
parse and annotate type for bq PARSE_BIG/NUMERIC (#5690)
|
|
65
|
+
|
|
66
|
+
- 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))*:
|
|
67
|
+
|
|
68
|
+
parse and annotate type for bq CODE_POINTS_TO_BYTES (#5686)
|
|
69
|
+
|
|
70
|
+
- 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))*:
|
|
71
|
+
|
|
72
|
+
parse and annotate type for bq TO_CODE_POINTS (#5685)
|
|
73
|
+
|
|
74
|
+
- 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))*:
|
|
75
|
+
|
|
76
|
+
parse and annotate type for bq SAFE_CONVERT_BYTES_TO_STRING (#5681)
|
|
77
|
+
|
|
78
|
+
- 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))*:
|
|
79
|
+
|
|
80
|
+
parse and annotate type for bigquery APPROX_QUANTILES (#5678)
|
|
81
|
+
|
|
82
|
+
- 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))*:
|
|
83
|
+
|
|
84
|
+
parse and annotate type for bq BOOL (#5697)
|
|
85
|
+
|
|
86
|
+
- 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))*:
|
|
87
|
+
|
|
88
|
+
parse and annotate type for bq FLOAT64 (#5700)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### :sparkles: New Features
|
|
92
|
+
- [`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))*
|
|
93
|
+
- [`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))*
|
|
94
|
+
- :arrow_lower_right: *addresses issue [#5604](https://github.com/tobymao/sqlglot/issues/5604) opened by [@bricct](https://github.com/bricct)*
|
|
95
|
+
- [`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))*
|
|
96
|
+
- [`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))*
|
|
97
|
+
- [`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))*
|
|
98
|
+
- [`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))*
|
|
99
|
+
- [`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))*
|
|
100
|
+
- [`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))*
|
|
101
|
+
- [`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))*
|
|
102
|
+
- [`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))*
|
|
103
|
+
- [`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))*
|
|
104
|
+
- [`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))*
|
|
105
|
+
- [`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))*
|
|
106
|
+
- [`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))*
|
|
107
|
+
- [`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))*
|
|
108
|
+
- [`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))*
|
|
109
|
+
- [`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))*
|
|
110
|
+
- [`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))*
|
|
111
|
+
- [`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))*
|
|
112
|
+
- [`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))*
|
|
113
|
+
- :arrow_lower_right: *addresses issue [#5638](https://github.com/tobymao/sqlglot/issues/5638) opened by [@catlynkong](https://github.com/catlynkong)*
|
|
114
|
+
- [`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))*
|
|
115
|
+
- [`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))*
|
|
116
|
+
- [`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))*
|
|
117
|
+
- [`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))*
|
|
118
|
+
- [`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))*
|
|
119
|
+
- [`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))*
|
|
120
|
+
- [`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))*
|
|
121
|
+
- [`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))*
|
|
122
|
+
- [`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))*
|
|
123
|
+
- [`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))*
|
|
124
|
+
- [`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))*
|
|
125
|
+
- [`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))*
|
|
126
|
+
- [`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))*
|
|
127
|
+
- [`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))*
|
|
128
|
+
- [`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))*
|
|
129
|
+
- [`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))*
|
|
130
|
+
- [`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))*
|
|
131
|
+
- [`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))*
|
|
132
|
+
- [`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))*
|
|
133
|
+
- [`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))*
|
|
134
|
+
- :arrow_lower_right: *addresses issue [#5655](https://github.com/tobymao/sqlglot/issues/5655) opened by [@jasonthomassql](https://github.com/jasonthomassql)*
|
|
135
|
+
- [`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))*
|
|
136
|
+
- [`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))*
|
|
137
|
+
- [`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))*
|
|
138
|
+
- [`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))*
|
|
139
|
+
- [`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))*
|
|
140
|
+
- [`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))*
|
|
141
|
+
- [`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))*
|
|
142
|
+
- [`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))*
|
|
143
|
+
- [`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))*
|
|
144
|
+
- [`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))*
|
|
145
|
+
- [`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))*
|
|
146
|
+
- [`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))*
|
|
147
|
+
- [`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))*
|
|
148
|
+
- [`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))*
|
|
149
|
+
- [`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))*
|
|
150
|
+
- [`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))*
|
|
151
|
+
- [`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))*
|
|
152
|
+
- [`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))*
|
|
153
|
+
- [`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))*
|
|
154
|
+
- [`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))*
|
|
155
|
+
- [`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))*
|
|
156
|
+
|
|
157
|
+
### :bug: Bug Fixes
|
|
158
|
+
- [`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))*
|
|
159
|
+
- [`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))*
|
|
160
|
+
- :arrow_lower_right: *fixes issue [#5618](https://github.com/tobymao/sqlglot/issues/5618) opened by [@MQMMMQM](https://github.com/MQMMMQM)*
|
|
161
|
+
- [`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))*
|
|
162
|
+
- [`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))*
|
|
163
|
+
- [`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))*
|
|
164
|
+
- :arrow_lower_right: *fixes issue [#5643](https://github.com/tobymao/sqlglot/issues/5643) opened by [@michal-clutch](https://github.com/michal-clutch)*
|
|
165
|
+
|
|
166
|
+
### :wrench: Chores
|
|
167
|
+
- [`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))*
|
|
168
|
+
- [`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))*
|
|
169
|
+
- [`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))*
|
|
170
|
+
- [`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))*
|
|
171
|
+
|
|
172
|
+
|
|
4
173
|
## [v27.8.0] - 2025-08-19
|
|
5
174
|
### :boom: BREAKING CHANGES
|
|
6
175
|
- 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 +6773,4 @@ Changelog
|
|
|
6604
6773
|
[v27.6.0]: https://github.com/tobymao/sqlglot/compare/v27.5.1...v27.6.0
|
|
6605
6774
|
[v27.7.0]: https://github.com/tobymao/sqlglot/compare/v27.6.0...v27.7.0
|
|
6606
6775
|
[v27.8.0]: https://github.com/tobymao/sqlglot/compare/v27.7.0...v27.8.0
|
|
6776
|
+
[v27.9.0]: https://github.com/tobymao/sqlglot/compare/v27.8.0...v27.9.0
|
|
@@ -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.10.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (27, 10, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g727bf8378'
|
|
@@ -340,16 +340,13 @@ def _build_format_time(expr_type: t.Type[exp.Expression]) -> t.Callable[[t.List]
|
|
|
340
340
|
return _builder
|
|
341
341
|
|
|
342
342
|
|
|
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
|
-
|
|
343
|
+
def _build_contains_substring(args: t.List) -> exp.Contains:
|
|
347
344
|
# Lowercase the operands in case of transpilation, as exp.Contains
|
|
348
345
|
# is case-sensitive on other dialects
|
|
349
346
|
this = exp.Lower(this=seq_get(args, 0))
|
|
350
347
|
expr = exp.Lower(this=seq_get(args, 1))
|
|
351
348
|
|
|
352
|
-
return exp.Contains(this=this, expression=expr)
|
|
349
|
+
return exp.Contains(this=this, expression=expr, json_scope=seq_get(args, 2))
|
|
353
350
|
|
|
354
351
|
|
|
355
352
|
def _json_extract_sql(self: BigQuery.Generator, expression: JSON_EXTRACT_TYPE) -> str:
|
|
@@ -497,7 +494,6 @@ class BigQuery(Dialect):
|
|
|
497
494
|
exp.Array: _annotate_array,
|
|
498
495
|
exp.ArrayConcat: lambda self, e: self._annotate_by_args(e, "this", "expressions"),
|
|
499
496
|
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
497
|
exp.BitwiseAndAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
502
498
|
exp.BitwiseOrAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
503
499
|
exp.BitwiseXorAgg: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
@@ -511,6 +507,7 @@ class BigQuery(Dialect):
|
|
|
511
507
|
e, exp.DataType.Type.VARCHAR
|
|
512
508
|
),
|
|
513
509
|
exp.Concat: _annotate_concat,
|
|
510
|
+
exp.Contains: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
514
511
|
exp.Corr: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
515
512
|
exp.CovarPop: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
516
513
|
exp.CovarSamp: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DOUBLE),
|
|
@@ -524,6 +521,7 @@ class BigQuery(Dialect):
|
|
|
524
521
|
),
|
|
525
522
|
exp.Grouping: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BIGINT),
|
|
526
523
|
exp.JSONArray: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.JSON),
|
|
524
|
+
exp.JSONBool: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BOOLEAN),
|
|
527
525
|
exp.JSONExtractScalar: lambda self, e: self._annotate_with_type(
|
|
528
526
|
e, exp.DataType.Type.VARCHAR
|
|
529
527
|
),
|
|
@@ -534,6 +532,7 @@ class BigQuery(Dialect):
|
|
|
534
532
|
exp.Lag: lambda self, e: self._annotate_by_args(e, "this", "default"),
|
|
535
533
|
exp.LowerHex: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
536
534
|
exp.MD5Digest: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.BINARY),
|
|
535
|
+
exp.Normalize: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.VARCHAR),
|
|
537
536
|
exp.ParseTime: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.TIME),
|
|
538
537
|
exp.ParseDatetime: lambda self, e: self._annotate_with_type(e, exp.DataType.Type.DATETIME),
|
|
539
538
|
exp.ParseBignumeric: lambda self, e: self._annotate_with_type(
|
|
@@ -689,6 +688,10 @@ class BigQuery(Dialect):
|
|
|
689
688
|
"JSON_VALUE_ARRAY": _build_extract_json_with_default_path(exp.JSONValueArray),
|
|
690
689
|
"LENGTH": lambda args: exp.Length(this=seq_get(args, 0), binary=True),
|
|
691
690
|
"MD5": exp.MD5Digest.from_arg_list,
|
|
691
|
+
"NORMALIZE_AND_CASEFOLD": lambda args: exp.Normalize(
|
|
692
|
+
this=seq_get(args, 0), form=seq_get(args, 1), is_casefold=True
|
|
693
|
+
),
|
|
694
|
+
"OCTET_LENGTH": exp.ByteLength.from_arg_list,
|
|
692
695
|
"TO_HEX": _build_to_hex,
|
|
693
696
|
"PARSE_DATE": lambda args: build_formatted_time(exp.StrToDate, "bigquery")(
|
|
694
697
|
[seq_get(args, 1), seq_get(args, 0)]
|
|
@@ -1155,6 +1158,7 @@ class BigQuery(Dialect):
|
|
|
1155
1158
|
exp.ArrayContains: _array_contains_sql,
|
|
1156
1159
|
exp.ArrayFilter: filter_array_using_unnest,
|
|
1157
1160
|
exp.ArrayRemove: filter_array_using_unnest,
|
|
1161
|
+
exp.ByteLength: rename_func("BYTE_LENGTH"),
|
|
1158
1162
|
exp.Cast: transforms.preprocess([transforms.remove_precision_parameterized_types]),
|
|
1159
1163
|
exp.CollateProperty: lambda self, e: (
|
|
1160
1164
|
f"DEFAULT COLLATE {self.sql(e, 'this')}"
|
|
@@ -1198,6 +1202,11 @@ class BigQuery(Dialect):
|
|
|
1198
1202
|
exp.MD5: lambda self, e: self.func("TO_HEX", self.func("MD5", e.this)),
|
|
1199
1203
|
exp.MD5Digest: rename_func("MD5"),
|
|
1200
1204
|
exp.Min: min_or_least,
|
|
1205
|
+
exp.Normalize: lambda self, e: self.func(
|
|
1206
|
+
"NORMALIZE_AND_CASEFOLD" if e.args.get("is_casefold") else "NORMALIZE",
|
|
1207
|
+
e.this,
|
|
1208
|
+
e.args.get("form"),
|
|
1209
|
+
),
|
|
1201
1210
|
exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
|
|
1202
1211
|
exp.RegexpExtract: lambda self, e: self.func(
|
|
1203
1212
|
"REGEXP_EXTRACT",
|
|
@@ -1533,7 +1542,7 @@ class BigQuery(Dialect):
|
|
|
1533
1542
|
this = this.this
|
|
1534
1543
|
expr = expr.this
|
|
1535
1544
|
|
|
1536
|
-
return self.func("CONTAINS_SUBSTR", this, expr)
|
|
1545
|
+
return self.func("CONTAINS_SUBSTR", this, expr, expression.args.get("json_scope"))
|
|
1537
1546
|
|
|
1538
1547
|
def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str] = None) -> str:
|
|
1539
1548
|
this = expression.this
|
|
@@ -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,
|
|
@@ -113,6 +113,11 @@ class SingleStore(MySQL):
|
|
|
113
113
|
% 7,
|
|
114
114
|
"UNIX_TIMESTAMP": exp.StrToUnix.from_arg_list,
|
|
115
115
|
"FROM_UNIXTIME": build_formatted_time(exp.UnixToTime, "mysql"),
|
|
116
|
+
"TIME_BUCKET": lambda args: exp.DateBin(
|
|
117
|
+
this=seq_get(args, 0),
|
|
118
|
+
expression=seq_get(args, 1),
|
|
119
|
+
origin=seq_get(args, 2),
|
|
120
|
+
),
|
|
116
121
|
"BSON_EXTRACT_BSON": build_json_extract_path(exp.JSONBExtract),
|
|
117
122
|
"BSON_EXTRACT_STRING": build_json_extract_path(
|
|
118
123
|
exp.JSONBExtractScalar, json_type="STRING"
|
|
@@ -148,6 +153,7 @@ class SingleStore(MySQL):
|
|
|
148
153
|
expression=seq_get(args, 0),
|
|
149
154
|
json_type="JSON",
|
|
150
155
|
),
|
|
156
|
+
"JSON_PRETTY": exp.JSONFormat.from_arg_list,
|
|
151
157
|
"DATE": exp.Date.from_arg_list,
|
|
152
158
|
"DAYNAME": lambda args: exp.TimeToStr(
|
|
153
159
|
this=seq_get(args, 0),
|
|
@@ -173,6 +179,11 @@ class SingleStore(MySQL):
|
|
|
173
179
|
occurrence=seq_get(args, 3),
|
|
174
180
|
parameters=seq_get(args, 4),
|
|
175
181
|
),
|
|
182
|
+
"REDUCE": lambda args: exp.Reduce(
|
|
183
|
+
initial=seq_get(args, 0),
|
|
184
|
+
this=seq_get(args, 1),
|
|
185
|
+
merge=seq_get(args, 2),
|
|
186
|
+
),
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
CAST_COLUMN_OPERATORS = {TokenType.COLON_GT, TokenType.NCOLON_GT}
|
|
@@ -263,6 +274,9 @@ class SingleStore(MySQL):
|
|
|
263
274
|
),
|
|
264
275
|
),
|
|
265
276
|
exp.UnixToTimeStr: lambda self, e: f"FROM_UNIXTIME({self.sql(e, 'this')}) :> TEXT",
|
|
277
|
+
exp.DateBin: unsupported_args("unit", "zone")(
|
|
278
|
+
lambda self, e: self.func("TIME_BUCKET", e.this, e.expression, e.args.get("origin"))
|
|
279
|
+
),
|
|
266
280
|
exp.JSONExtract: unsupported_args(
|
|
267
281
|
"only_json_types",
|
|
268
282
|
"expressions",
|
|
@@ -277,6 +291,7 @@ class SingleStore(MySQL):
|
|
|
277
291
|
exp.JSONPathKey: json_path_key_only_name,
|
|
278
292
|
exp.JSONPathSubscript: lambda self, e: self.json_path_part(e.this),
|
|
279
293
|
exp.JSONPathRoot: lambda *_: "",
|
|
294
|
+
exp.JSONFormat: unsupported_args("options", "is_json")(rename_func("JSON_PRETTY")),
|
|
280
295
|
exp.DayOfWeekIso: lambda self, e: f"(({self.func('DAYOFWEEK', e.this)} % 7) + 1)",
|
|
281
296
|
exp.DayOfMonth: rename_func("DAY"),
|
|
282
297
|
exp.Hll: rename_func("APPROX_COUNT_DISTINCT"),
|
|
@@ -330,6 +345,11 @@ class SingleStore(MySQL):
|
|
|
330
345
|
exp.FromBase: lambda self, e: self.func(
|
|
331
346
|
"CONV", e.this, e.expression, exp.Literal.number(10)
|
|
332
347
|
),
|
|
348
|
+
exp.Reduce: unsupported_args("finish")(
|
|
349
|
+
lambda self, e: self.func(
|
|
350
|
+
"REDUCE", e.args.get("initial"), e.this, e.args.get("merge")
|
|
351
|
+
)
|
|
352
|
+
),
|
|
333
353
|
}
|
|
334
354
|
TRANSFORMS.pop(exp.JSONExtractScalar)
|
|
335
355
|
|
|
@@ -2468,6 +2468,10 @@ class Grant(Expression):
|
|
|
2468
2468
|
}
|
|
2469
2469
|
|
|
2470
2470
|
|
|
2471
|
+
class Revoke(Expression):
|
|
2472
|
+
arg_types = {**Grant.arg_types, "cascade": False}
|
|
2473
|
+
|
|
2474
|
+
|
|
2471
2475
|
class Group(Expression):
|
|
2472
2476
|
arg_types = {
|
|
2473
2477
|
"expressions": False,
|
|
@@ -5942,8 +5946,9 @@ class ConcatWs(Concat):
|
|
|
5942
5946
|
_sql_names = ["CONCAT_WS"]
|
|
5943
5947
|
|
|
5944
5948
|
|
|
5949
|
+
# https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#contains_substr
|
|
5945
5950
|
class Contains(Func):
|
|
5946
|
-
arg_types = {"this": True, "expression": True}
|
|
5951
|
+
arg_types = {"this": True, "expression": True, "json_scope": False}
|
|
5947
5952
|
|
|
5948
5953
|
|
|
5949
5954
|
# https://docs.oracle.com/cd/B13789_01/server.101/b10759/operators004.htm#i1035022
|
|
@@ -5998,7 +6003,7 @@ class DateAdd(Func, IntervalOp):
|
|
|
5998
6003
|
|
|
5999
6004
|
|
|
6000
6005
|
class DateBin(Func, IntervalOp):
|
|
6001
|
-
arg_types = {"this": True, "expression": True, "unit": False, "zone": False}
|
|
6006
|
+
arg_types = {"this": True, "expression": True, "unit": False, "zone": False, "origin": False}
|
|
6002
6007
|
|
|
6003
6008
|
|
|
6004
6009
|
class DateSub(Func, IntervalOp):
|
|
@@ -6792,7 +6797,7 @@ class Nvl2(Func):
|
|
|
6792
6797
|
|
|
6793
6798
|
|
|
6794
6799
|
class Normalize(Func):
|
|
6795
|
-
arg_types = {"this": True, "form": False}
|
|
6800
|
+
arg_types = {"this": True, "form": False, "is_casefold": False}
|
|
6796
6801
|
|
|
6797
6802
|
|
|
6798
6803
|
class Overlay(Func):
|
|
@@ -4803,7 +4803,14 @@ class Generator(metaclass=_Generator):
|
|
|
4803
4803
|
|
|
4804
4804
|
return f"{this} APPLY({expr})"
|
|
4805
4805
|
|
|
4806
|
-
def
|
|
4806
|
+
def _grant_or_revoke_sql(
|
|
4807
|
+
self,
|
|
4808
|
+
expression: exp.Grant | exp.Revoke,
|
|
4809
|
+
keyword: str,
|
|
4810
|
+
preposition: str,
|
|
4811
|
+
grant_option_prefix: str = "",
|
|
4812
|
+
grant_option_suffix: str = "",
|
|
4813
|
+
) -> str:
|
|
4807
4814
|
privileges_sql = self.expressions(expression, key="privileges", flat=True)
|
|
4808
4815
|
|
|
4809
4816
|
kind = self.sql(expression, "kind")
|
|
@@ -4814,9 +4821,30 @@ class Generator(metaclass=_Generator):
|
|
|
4814
4821
|
|
|
4815
4822
|
principals = self.expressions(expression, key="principals", flat=True)
|
|
4816
4823
|
|
|
4817
|
-
|
|
4824
|
+
if not expression.args.get("grant_option"):
|
|
4825
|
+
grant_option_prefix = grant_option_suffix = ""
|
|
4818
4826
|
|
|
4819
|
-
|
|
4827
|
+
# cascade for revoke only
|
|
4828
|
+
cascade = self.sql(expression, "cascade")
|
|
4829
|
+
cascade = f" {cascade}" if cascade else ""
|
|
4830
|
+
|
|
4831
|
+
return f"{keyword} {grant_option_prefix}{privileges_sql} ON{kind}{securable} {preposition} {principals}{grant_option_suffix}{cascade}"
|
|
4832
|
+
|
|
4833
|
+
def grant_sql(self, expression: exp.Grant) -> str:
|
|
4834
|
+
return self._grant_or_revoke_sql(
|
|
4835
|
+
expression,
|
|
4836
|
+
keyword="GRANT",
|
|
4837
|
+
preposition="TO",
|
|
4838
|
+
grant_option_suffix=" WITH GRANT OPTION",
|
|
4839
|
+
)
|
|
4840
|
+
|
|
4841
|
+
def revoke_sql(self, expression: exp.Revoke) -> str:
|
|
4842
|
+
return self._grant_or_revoke_sql(
|
|
4843
|
+
expression,
|
|
4844
|
+
keyword="REVOKE",
|
|
4845
|
+
preposition="FROM",
|
|
4846
|
+
grant_option_prefix="GRANT OPTION FOR ",
|
|
4847
|
+
)
|
|
4820
4848
|
|
|
4821
4849
|
def grantprivilege_sql(self, expression: exp.GrantPrivilege):
|
|
4822
4850
|
this = self.sql(expression, "this")
|
|
@@ -844,6 +844,7 @@ class Parser(metaclass=_Parser):
|
|
|
844
844
|
TokenType.DESCRIBE: lambda self: self._parse_describe(),
|
|
845
845
|
TokenType.DROP: lambda self: self._parse_drop(),
|
|
846
846
|
TokenType.GRANT: lambda self: self._parse_grant(),
|
|
847
|
+
TokenType.REVOKE: lambda self: self._parse_revoke(),
|
|
847
848
|
TokenType.INSERT: lambda self: self._parse_insert(),
|
|
848
849
|
TokenType.KILL: lambda self: self._parse_kill(),
|
|
849
850
|
TokenType.LOAD: lambda self: self._parse_load(),
|
|
@@ -8410,9 +8411,9 @@ class Parser(metaclass=_Parser):
|
|
|
8410
8411
|
|
|
8411
8412
|
return self.expression(exp.GrantPrincipal, this=principal, kind=kind)
|
|
8412
8413
|
|
|
8413
|
-
def
|
|
8414
|
-
|
|
8415
|
-
|
|
8414
|
+
def _parse_grant_revoke_common(
|
|
8415
|
+
self,
|
|
8416
|
+
) -> t.Tuple[t.Optional[t.List], t.Optional[str], t.Optional[exp.Expression]]:
|
|
8416
8417
|
privileges = self._parse_csv(self._parse_grant_privilege)
|
|
8417
8418
|
|
|
8418
8419
|
self._match(TokenType.ON)
|
|
@@ -8422,6 +8423,13 @@ class Parser(metaclass=_Parser):
|
|
|
8422
8423
|
# such as "foo.*", "*.*" which are not easily parseable yet
|
|
8423
8424
|
securable = self._try_parse(self._parse_table_parts)
|
|
8424
8425
|
|
|
8426
|
+
return privileges, kind, securable
|
|
8427
|
+
|
|
8428
|
+
def _parse_grant(self) -> exp.Grant | exp.Command:
|
|
8429
|
+
start = self._prev
|
|
8430
|
+
|
|
8431
|
+
privileges, kind, securable = self._parse_grant_revoke_common()
|
|
8432
|
+
|
|
8425
8433
|
if not securable or not self._match_text_seq("TO"):
|
|
8426
8434
|
return self._parse_as_command(start)
|
|
8427
8435
|
|
|
@@ -8441,6 +8449,35 @@ class Parser(metaclass=_Parser):
|
|
|
8441
8449
|
grant_option=grant_option,
|
|
8442
8450
|
)
|
|
8443
8451
|
|
|
8452
|
+
def _parse_revoke(self) -> exp.Revoke | exp.Command:
|
|
8453
|
+
start = self._prev
|
|
8454
|
+
|
|
8455
|
+
grant_option = self._match_text_seq("GRANT", "OPTION", "FOR")
|
|
8456
|
+
|
|
8457
|
+
privileges, kind, securable = self._parse_grant_revoke_common()
|
|
8458
|
+
|
|
8459
|
+
if not securable or not self._match_text_seq("FROM"):
|
|
8460
|
+
return self._parse_as_command(start)
|
|
8461
|
+
|
|
8462
|
+
principals = self._parse_csv(self._parse_grant_principal)
|
|
8463
|
+
|
|
8464
|
+
cascade = None
|
|
8465
|
+
if self._match_texts(("CASCADE", "RESTRICT")):
|
|
8466
|
+
cascade = self._prev.text.upper()
|
|
8467
|
+
|
|
8468
|
+
if self._curr:
|
|
8469
|
+
return self._parse_as_command(start)
|
|
8470
|
+
|
|
8471
|
+
return self.expression(
|
|
8472
|
+
exp.Revoke,
|
|
8473
|
+
privileges=privileges,
|
|
8474
|
+
kind=kind,
|
|
8475
|
+
securable=securable,
|
|
8476
|
+
principals=principals,
|
|
8477
|
+
grant_option=grant_option,
|
|
8478
|
+
cascade=cascade,
|
|
8479
|
+
)
|
|
8480
|
+
|
|
8444
8481
|
def _parse_overlay(self) -> exp.Overlay:
|
|
8445
8482
|
return self.expression(
|
|
8446
8483
|
exp.Overlay,
|
|
@@ -376,6 +376,7 @@ class TokenType(AutoName):
|
|
|
376
376
|
RENAME = auto()
|
|
377
377
|
REPLACE = auto()
|
|
378
378
|
RETURNING = auto()
|
|
379
|
+
REVOKE = auto()
|
|
379
380
|
REFERENCES = auto()
|
|
380
381
|
RIGHT = auto()
|
|
381
382
|
RLIKE = auto()
|
|
@@ -972,6 +973,7 @@ class Tokenizer(metaclass=_Tokenizer):
|
|
|
972
973
|
"COMMENT": TokenType.COMMENT,
|
|
973
974
|
"EXPLAIN": TokenType.COMMAND,
|
|
974
975
|
"GRANT": TokenType.GRANT,
|
|
976
|
+
"REVOKE": TokenType.REVOKE,
|
|
975
977
|
"OPTIMIZE": TokenType.COMMAND,
|
|
976
978
|
"PREPARE": TokenType.COMMAND,
|
|
977
979
|
"VACUUM": TokenType.COMMAND,
|
|
@@ -1699,9 +1699,7 @@ WHERE
|
|
|
1699
1699
|
},
|
|
1700
1700
|
)
|
|
1701
1701
|
|
|
1702
|
-
self.validate_identity(
|
|
1703
|
-
"CONTAINS_SUBSTR(a, b, json_scope => 'JSON_KEYS_AND_VALUES')"
|
|
1704
|
-
).assert_is(exp.Anonymous)
|
|
1702
|
+
self.validate_identity("CONTAINS_SUBSTR(a, b, json_scope => 'JSON_KEYS_AND_VALUES')")
|
|
1705
1703
|
|
|
1706
1704
|
self.validate_all(
|
|
1707
1705
|
"""CONTAINS_SUBSTR(a, b)""",
|
|
@@ -1795,6 +1793,16 @@ WHERE
|
|
|
1795
1793
|
self.validate_identity("FLOAT64(PARSE_JSON('9.8'))")
|
|
1796
1794
|
self.validate_identity("FLOAT64(PARSE_JSON('9.8'), wide_number_mode => 'round')")
|
|
1797
1795
|
self.validate_identity("FLOAT64(PARSE_JSON('9.8'), wide_number_mode => 'exact')")
|
|
1796
|
+
self.validate_identity("NORMALIZE_AND_CASEFOLD('foo')")
|
|
1797
|
+
self.validate_identity("NORMALIZE_AND_CASEFOLD('foo', NFKC)")
|
|
1798
|
+
self.validate_identity(
|
|
1799
|
+
"OCTET_LENGTH('foo')",
|
|
1800
|
+
"BYTE_LENGTH('foo')",
|
|
1801
|
+
)
|
|
1802
|
+
self.validate_identity(
|
|
1803
|
+
"OCTET_LENGTH(b'foo')",
|
|
1804
|
+
"BYTE_LENGTH(b'foo')",
|
|
1805
|
+
)
|
|
1798
1806
|
|
|
1799
1807
|
def test_errors(self):
|
|
1800
1808
|
with self.assertRaises(ParseError):
|
|
@@ -1423,6 +1423,10 @@ LIFETIME(MIN 0 MAX 0)""",
|
|
|
1423
1423
|
self.validate_identity("GRANT SELECT(x, y) ON db.table TO john WITH GRANT OPTION")
|
|
1424
1424
|
self.validate_identity("GRANT INSERT(x, y) ON db.table TO john")
|
|
1425
1425
|
|
|
1426
|
+
def test_revoke(self):
|
|
1427
|
+
self.validate_identity("REVOKE SELECT(x, y) ON db.table FROM john")
|
|
1428
|
+
self.validate_identity("REVOKE INSERT(x, y) ON db.table FROM john")
|
|
1429
|
+
|
|
1426
1430
|
def test_array_join(self):
|
|
1427
1431
|
expr = self.validate_identity(
|
|
1428
1432
|
"SELECT * FROM arrays_test ARRAY JOIN arr1, arrays_test.arr2 AS foo, ['a', 'b', 'c'] AS elem"
|