sqlglot 27.17.0__tar.gz → 27.19.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.17.0 → sqlglot-27.19.0}/CHANGELOG.md +127 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/PKG-INFO +3 -2
- {sqlglot-27.17.0 → sqlglot-27.19.0}/README.md +2 -1
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/_version.py +3 -3
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/__init__.py +1 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/bigquery.py +25 -9
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/dialect.py +9 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/mysql.py +15 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/snowflake.py +33 -7
- sqlglot-27.19.0/sqlglot/dialects/solr.py +22 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/expressions.py +33 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/simplify.py +1 -1
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/parser.py +27 -17
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.egg-info/PKG-INFO +3 -2
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.egg-info/SOURCES.txt +2 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_bigquery.py +1 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_databricks.py +4 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_mysql.py +17 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_snowflake.py +41 -7
- sqlglot-27.19.0/tests/dialects/test_solr.py +12 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/identity.sql +2 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/annotate_functions.sql +96 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_optimizer.py +10 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_parser.py +21 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/.gitignore +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/.gitpod.yml +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/CONTRIBUTING.md +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/LICENSE +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/MANIFEST.in +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/Makefile +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/pyproject.toml +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/setup.cfg +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/setup.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/__init__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/__main__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/_typing.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/diff.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/errors.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/generator.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/helper.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/lineage.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/merge_subqueries.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/qualify_columns.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/scope.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/planner.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/py.typed +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/schema.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/serde.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/time.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/tokens.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/transforms.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot/trie.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.egg-info/requires.txt +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglot.png +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/Cargo.lock +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/Cargo.toml +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/benches/dialect_settings.json +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/benches/long.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/benches/token_type_settings.json +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/benches/tokenizer_dialect_settings.json +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/benches/tokenizer_settings.json +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/pyproject.toml +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/src/lib.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/src/settings.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/src/token.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/src/tokenizer.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/sqlglotrs/src/trie.rs +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/__init__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_clickhouse.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_dialect.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_duckdb.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_oracle.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_postgres.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_redshift.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_spark.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_sqlite.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/dialects/test_tsql.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/qualify_columns.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/helpers.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_build.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_diff.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_docs.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_executor.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_expressions.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_generator.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_helper.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_lineage.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_schema.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_serde.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_time.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_tokens.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_transforms.py +0 -0
- {sqlglot-27.17.0 → sqlglot-27.19.0}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,131 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v27.18.0] - 2025-09-25
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`7f13eaf`](https://github.com/tobymao/sqlglot/commit/7f13eaf7769a3381a56c9209af590835be2f95cd) - Annotate type for snowflake DECOMPRESS_BINARY function *(PR [#5945](https://github.com/tobymao/sqlglot/pull/5945) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
7
|
+
|
|
8
|
+
Annotate type for snowflake DECOMPRESS_BINARY function (#5945)
|
|
9
|
+
|
|
10
|
+
- due to [`be12b29`](https://github.com/tobymao/sqlglot/commit/be12b29b5a7bd6d6e09dbd8c17086bd77c19abc0) - Annotate type for snowflake DECOMPRESS_STRING function *(PR [#5947](https://github.com/tobymao/sqlglot/pull/5947) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
11
|
+
|
|
12
|
+
Annotate type for snowflake DECOMPRESS_STRING function (#5947)
|
|
13
|
+
|
|
14
|
+
- due to [`1573fef`](https://github.com/tobymao/sqlglot/commit/1573fefac27b5b1215e3d458f8ccf1b9dadbb772) - annotate types for Snowflake JAROWINKLER_SIMILARITY function *(PR [#5950](https://github.com/tobymao/sqlglot/pull/5950) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
15
|
+
|
|
16
|
+
annotate types for Snowflake JAROWINKLER_SIMILARITY function (#5950)
|
|
17
|
+
|
|
18
|
+
- due to [`883c6ab`](https://github.com/tobymao/sqlglot/commit/883c6abe589865f478d95604e8d670e57afd04af) - annotate type for Snowflake COLLATION function *(PR [#5939](https://github.com/tobymao/sqlglot/pull/5939) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
19
|
+
|
|
20
|
+
annotate type for Snowflake COLLATION function (#5939)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### :sparkles: New Features
|
|
24
|
+
- [`7f13eaf`](https://github.com/tobymao/sqlglot/commit/7f13eaf7769a3381a56c9209af590835be2f95cd) - **optimizer**: Annotate type for snowflake DECOMPRESS_BINARY function *(PR [#5945](https://github.com/tobymao/sqlglot/pull/5945) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
25
|
+
- [`be12b29`](https://github.com/tobymao/sqlglot/commit/be12b29b5a7bd6d6e09dbd8c17086bd77c19abc0) - **optimizer**: Annotate type for snowflake DECOMPRESS_STRING function *(PR [#5947](https://github.com/tobymao/sqlglot/pull/5947) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
26
|
+
- [`a55fce5`](https://github.com/tobymao/sqlglot/commit/a55fce5310a50af132c5d06bb299fe3f025442c4) - **optimizer**: Annotate type for snowflake LPAD function *(PR [#5948](https://github.com/tobymao/sqlglot/pull/5948) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
27
|
+
- [`05e07aa`](https://github.com/tobymao/sqlglot/commit/05e07aa740d7977a6b42ec15ae4fa9c2168a15f5) - **optimizer**: annotate type for Snowflake INSERT function *(PR [#5942](https://github.com/tobymao/sqlglot/pull/5942) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
28
|
+
- [`6268e10`](https://github.com/tobymao/sqlglot/commit/6268e107a947badaa00508544f5389412806ecd0) - **solr**: initial dialect implementation *(PR [#5946](https://github.com/tobymao/sqlglot/pull/5946) by [@aadel](https://github.com/aadel))*
|
|
29
|
+
- [`1573fef`](https://github.com/tobymao/sqlglot/commit/1573fefac27b5b1215e3d458f8ccf1b9dadbb772) - **optimizer**: annotate types for Snowflake JAROWINKLER_SIMILARITY function *(PR [#5950](https://github.com/tobymao/sqlglot/pull/5950) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
30
|
+
- [`883c6ab`](https://github.com/tobymao/sqlglot/commit/883c6abe589865f478d95604e8d670e57afd04af) - **optimizer**: annotate type for Snowflake COLLATION function *(PR [#5939](https://github.com/tobymao/sqlglot/pull/5939) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
31
|
+
- [`627c18d`](https://github.com/tobymao/sqlglot/commit/627c18d7da6bf644bc14c0f17963dea0be20604a) - **mysql**: add valid INTERVAL units *(PR [#5951](https://github.com/tobymao/sqlglot/pull/5951) by [@geooo109](https://github.com/geooo109))*
|
|
32
|
+
|
|
33
|
+
### :bug: Bug Fixes
|
|
34
|
+
- [`3846d4d`](https://github.com/tobymao/sqlglot/commit/3846d4dcdf8cbf8e90b2661083a567ab0547ad3c) - **solr**: properly support OR alternative operator *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
35
|
+
- [`df428d5`](https://github.com/tobymao/sqlglot/commit/df428d516113a47ae50d04cd50a250830589c072) - **parser**: interval identifier followed by END *(PR [#5944](https://github.com/tobymao/sqlglot/pull/5944) by [@geooo109](https://github.com/geooo109))*
|
|
36
|
+
- [`e178d16`](https://github.com/tobymao/sqlglot/commit/e178d1674a71e6f35a6acfa8f4a317f0fe2e4516) - **duckdb**: UNNEST as table *(PR [#5953](https://github.com/tobymao/sqlglot/pull/5953) by [@geooo109](https://github.com/geooo109))*
|
|
37
|
+
- :arrow_lower_right: *fixes issue [#5952](https://github.com/tobymao/sqlglot/issues/5952) opened by [@denis-komarov](https://github.com/denis-komarov)*
|
|
38
|
+
- [`24feb8e`](https://github.com/tobymao/sqlglot/commit/24feb8ee0bc43f3f14fd768c9a0d986355becea2) - **parser**: parse `UPDATE` clauses in any order *(PR [#5958](https://github.com/tobymao/sqlglot/pull/5958) by [@georgesittas](https://github.com/georgesittas))*
|
|
39
|
+
- :arrow_lower_right: *fixes issue [#5956](https://github.com/tobymao/sqlglot/issues/5956) opened by [@sfc-gh-clathrope](https://github.com/sfc-gh-clathrope)*
|
|
40
|
+
- [`980f99a`](https://github.com/tobymao/sqlglot/commit/980f99a4cc0613012a189ee5636af37ec736040c) - **snowflake**: properly generate inferred `STRUCT` data types *(PR [#5954](https://github.com/tobymao/sqlglot/pull/5954) by [@georgesittas](https://github.com/georgesittas))*
|
|
41
|
+
|
|
42
|
+
### :wrench: Chores
|
|
43
|
+
- [`c18aaf8`](https://github.com/tobymao/sqlglot/commit/c18aaf80fd7375e89dfc8863da619d84f3257353) - cleanup *(commit by [@tobymao](https://github.com/tobymao))*
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [v27.17.0] - 2025-09-23
|
|
47
|
+
### :boom: BREAKING CHANGES
|
|
48
|
+
- due to [`f4ad258`](https://github.com/tobymao/sqlglot/commit/f4ad25882951de4e4442dfd5189a56d5a1c5e630) - Annotate types for Snowflake BASE64_DECODE_BINARY function *(PR [#5917](https://github.com/tobymao/sqlglot/pull/5917) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
49
|
+
|
|
50
|
+
Annotate types for Snowflake BASE64_DECODE_BINARY function (#5917)
|
|
51
|
+
|
|
52
|
+
- due to [`6d0e3f8`](https://github.com/tobymao/sqlglot/commit/6d0e3f8dcae7ed1a7659ece69b1f94cec5e7300e) - Add parser support to ilike like function versions. *(PR [#5915](https://github.com/tobymao/sqlglot/pull/5915) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
53
|
+
|
|
54
|
+
Add parser support to ilike like function versions. (#5915)
|
|
55
|
+
|
|
56
|
+
- due to [`22c7ed7`](https://github.com/tobymao/sqlglot/commit/22c7ed7734b41ca544bb67bcc1ca4151f6d5f05f) - parse tuple *(PR [#5920](https://github.com/tobymao/sqlglot/pull/5920) by [@geooo109](https://github.com/geooo109))*:
|
|
57
|
+
|
|
58
|
+
parse tuple (#5920)
|
|
59
|
+
|
|
60
|
+
- due to [`fc5624e`](https://github.com/tobymao/sqlglot/commit/fc5624eca43d2855ac350c92d85b184a6893d5ca) - annotate types for Snowflake ASCII function *(PR [#5926](https://github.com/tobymao/sqlglot/pull/5926) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
61
|
+
|
|
62
|
+
annotate types for Snowflake ASCII function (#5926)
|
|
63
|
+
|
|
64
|
+
- due to [`4e81690`](https://github.com/tobymao/sqlglot/commit/4e8169045edcaa28ae43abeb07370df63846fbfd) - annotate type for Snowflake COLLATE function *(PR [#5931](https://github.com/tobymao/sqlglot/pull/5931) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
65
|
+
|
|
66
|
+
annotate type for Snowflake COLLATE function (#5931)
|
|
67
|
+
|
|
68
|
+
- due to [`f07d35d`](https://github.com/tobymao/sqlglot/commit/f07d35d29104c6203efaab738118d1903614b83c) - annotate type for Snowflake CHR function *(PR [#5929](https://github.com/tobymao/sqlglot/pull/5929) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
69
|
+
|
|
70
|
+
annotate type for Snowflake CHR function (#5929)
|
|
71
|
+
|
|
72
|
+
- due to [`f8c0ee4`](https://github.com/tobymao/sqlglot/commit/f8c0ee4d3c1a4d4a92b897d1cc85f9904c8e566b) - Add function and annotate snowflake hex decode string and binary functions *(PR [#5928](https://github.com/tobymao/sqlglot/pull/5928) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
73
|
+
|
|
74
|
+
Add function and annotate snowflake hex decode string and binary functions (#5928)
|
|
75
|
+
|
|
76
|
+
- due to [`66f9501`](https://github.com/tobymao/sqlglot/commit/66f9501d76d087798bad93e578273ab2a45e2575) - annotate types for Snowflake BIT_LENGTH function *(PR [#5927](https://github.com/tobymao/sqlglot/pull/5927) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
77
|
+
|
|
78
|
+
annotate types for Snowflake BIT_LENGTH function (#5927)
|
|
79
|
+
|
|
80
|
+
- due to [`7878437`](https://github.com/tobymao/sqlglot/commit/78784370712df65a2e1e79a1c2b441131ed7222a) - annotate snowflake's `BASE64_DECODE_STRING`, `BASE64_ENCODE` *(PR [#5922](https://github.com/tobymao/sqlglot/pull/5922) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
81
|
+
|
|
82
|
+
annotate snowflake's `BASE64_DECODE_STRING`, `BASE64_ENCODE` (#5922)
|
|
83
|
+
|
|
84
|
+
- due to [`9bcad04`](https://github.com/tobymao/sqlglot/commit/9bcad040bd51dd03821c68eea1a73534fc7a81b7) - Annotate type for HEX ENCODE function. *(PR [#5936](https://github.com/tobymao/sqlglot/pull/5936) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
85
|
+
|
|
86
|
+
Annotate type for HEX ENCODE function. (#5936)
|
|
87
|
+
|
|
88
|
+
- due to [`590928f`](https://github.com/tobymao/sqlglot/commit/590928f4637306e8cf3f1302d5dd5d5dbc76e7e0) - annotate type for Snowflake INITCAP function *(PR [#5941](https://github.com/tobymao/sqlglot/pull/5941) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
89
|
+
|
|
90
|
+
annotate type for Snowflake INITCAP function (#5941)
|
|
91
|
+
|
|
92
|
+
- due to [`ac04de1`](https://github.com/tobymao/sqlglot/commit/ac04de1944c7a976406581b489b3cf9b11dafb77) - annotate type for Snowflake EDITDISTANCE function *(PR [#5940](https://github.com/tobymao/sqlglot/pull/5940) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*:
|
|
93
|
+
|
|
94
|
+
annotate type for Snowflake EDITDISTANCE function (#5940)
|
|
95
|
+
|
|
96
|
+
- due to [`9e28af8`](https://github.com/tobymao/sqlglot/commit/9e28af8a52ced951ecf7f4e85a6305e20a13de1f) - Annotate type for snowflake COMPRESS function *(PR [#5938](https://github.com/tobymao/sqlglot/pull/5938) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
97
|
+
|
|
98
|
+
Annotate type for snowflake COMPRESS function (#5938)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### :sparkles: New Features
|
|
102
|
+
- [`f4ad258`](https://github.com/tobymao/sqlglot/commit/f4ad25882951de4e4442dfd5189a56d5a1c5e630) - **optimizer**: Annotate types for Snowflake BASE64_DECODE_BINARY function *(PR [#5917](https://github.com/tobymao/sqlglot/pull/5917) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
103
|
+
- [`6d0e3f8`](https://github.com/tobymao/sqlglot/commit/6d0e3f8dcae7ed1a7659ece69b1f94cec5e7300e) - **optimizer**: Add parser support to ilike like function versions. *(PR [#5915](https://github.com/tobymao/sqlglot/pull/5915) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
104
|
+
- [`fc5624e`](https://github.com/tobymao/sqlglot/commit/fc5624eca43d2855ac350c92d85b184a6893d5ca) - **optimizer**: annotate types for Snowflake ASCII function *(PR [#5926](https://github.com/tobymao/sqlglot/pull/5926) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
105
|
+
- [`4e81690`](https://github.com/tobymao/sqlglot/commit/4e8169045edcaa28ae43abeb07370df63846fbfd) - **optimizer**: annotate type for Snowflake COLLATE function *(PR [#5931](https://github.com/tobymao/sqlglot/pull/5931) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
106
|
+
- [`f07d35d`](https://github.com/tobymao/sqlglot/commit/f07d35d29104c6203efaab738118d1903614b83c) - **optimizer**: annotate type for Snowflake CHR function *(PR [#5929](https://github.com/tobymao/sqlglot/pull/5929) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
107
|
+
- [`f8c0ee4`](https://github.com/tobymao/sqlglot/commit/f8c0ee4d3c1a4d4a92b897d1cc85f9904c8e566b) - **optimizer**: Add function and annotate snowflake hex decode string and binary functions *(PR [#5928](https://github.com/tobymao/sqlglot/pull/5928) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
108
|
+
- [`66f9501`](https://github.com/tobymao/sqlglot/commit/66f9501d76d087798bad93e578273ab2a45e2575) - **optimizer**: annotate types for Snowflake BIT_LENGTH function *(PR [#5927](https://github.com/tobymao/sqlglot/pull/5927) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
109
|
+
- [`f4c810e`](https://github.com/tobymao/sqlglot/commit/f4c810e043d9379e94efb185e368e27ad9c15715) - transpile Trino `FORMAT` to DuckDB and Snowflake, closes [#5933](https://github.com/tobymao/sqlglot/pull/5933) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
110
|
+
- [`7878437`](https://github.com/tobymao/sqlglot/commit/78784370712df65a2e1e79a1c2b441131ed7222a) - **optimizer**: annotate snowflake's `BASE64_DECODE_STRING`, `BASE64_ENCODE` *(PR [#5922](https://github.com/tobymao/sqlglot/pull/5922) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
111
|
+
- [`9bcad04`](https://github.com/tobymao/sqlglot/commit/9bcad040bd51dd03821c68eea1a73534fc7a81b7) - **optimizer**: Annotate type for HEX ENCODE function. *(PR [#5936](https://github.com/tobymao/sqlglot/pull/5936) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
112
|
+
- [`590928f`](https://github.com/tobymao/sqlglot/commit/590928f4637306e8cf3f1302d5dd5d5dbc76e7e0) - **optimizer**: annotate type for Snowflake INITCAP function *(PR [#5941](https://github.com/tobymao/sqlglot/pull/5941) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
113
|
+
- [`ac04de1`](https://github.com/tobymao/sqlglot/commit/ac04de1944c7a976406581b489b3cf9b11dafb77) - **optimizer**: annotate type for Snowflake EDITDISTANCE function *(PR [#5940](https://github.com/tobymao/sqlglot/pull/5940) by [@fivetran-BradfordPaskewitz](https://github.com/fivetran-BradfordPaskewitz))*
|
|
114
|
+
- [`a385990`](https://github.com/tobymao/sqlglot/commit/a38599080932a8b54a169df8b7a69650cb47b6bc) - **parser**: support wrapped aggregate functions *(PR [#5943](https://github.com/tobymao/sqlglot/pull/5943) by [@geooo109](https://github.com/geooo109))*
|
|
115
|
+
- [`9e28af8`](https://github.com/tobymao/sqlglot/commit/9e28af8a52ced951ecf7f4e85a6305e20a13de1f) - **optimizer**: Annotate type for snowflake COMPRESS function *(PR [#5938](https://github.com/tobymao/sqlglot/pull/5938) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
116
|
+
|
|
117
|
+
### :bug: Bug Fixes
|
|
118
|
+
- [`6807a32`](https://github.com/tobymao/sqlglot/commit/6807a32cccf984dc13a30b815750b2c41374b845) - escape byte string delimiters *(PR [#5916](https://github.com/tobymao/sqlglot/pull/5916) by [@georgesittas](https://github.com/georgesittas))*
|
|
119
|
+
- [`22c7ed7`](https://github.com/tobymao/sqlglot/commit/22c7ed7734b41ca544bb67bcc1ca4151f6d5f05f) - **clickhouse**: parse tuple *(PR [#5920](https://github.com/tobymao/sqlglot/pull/5920) by [@geooo109](https://github.com/geooo109))*
|
|
120
|
+
- :arrow_lower_right: *fixes issue [#5913](https://github.com/tobymao/sqlglot/issues/5913) opened by [@tiagoskaneta](https://github.com/tiagoskaneta)*
|
|
121
|
+
- [`223160b`](https://github.com/tobymao/sqlglot/commit/223160bd7914d51e9ec1abb8d0f1053e13a65c98) - **parser**: NULLABLE as an identifier *(PR [#5921](https://github.com/tobymao/sqlglot/pull/5921) by [@geooo109](https://github.com/geooo109))*
|
|
122
|
+
- :arrow_lower_right: *fixes issue [#5919](https://github.com/tobymao/sqlglot/issues/5919) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
123
|
+
- [`42cfc79`](https://github.com/tobymao/sqlglot/commit/42cfc79ce120dee83084e2bb6b8bbd19f45bf06f) - **snowflake**: parse DAYOFWEEKISO *(PR [#5925](https://github.com/tobymao/sqlglot/pull/5925) by [@geooo109](https://github.com/geooo109))*
|
|
124
|
+
- :arrow_lower_right: *fixes issue [#5924](https://github.com/tobymao/sqlglot/issues/5924) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
125
|
+
- [`0be2cb4`](https://github.com/tobymao/sqlglot/commit/0be2cb448ee1a5ac020ac47e9944875c30e42632) - **postgres**: support `DISTINCT` qualifier in `JSON_AGG` fixes [#5935](https://github.com/tobymao/sqlglot/pull/5935) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
126
|
+
- [`e34b2e1`](https://github.com/tobymao/sqlglot/commit/e34b2e14d1f87d095955765173a5e17fc9985220) - allow grouping set parser to consume more syntax fixes [#5937](https://github.com/tobymao/sqlglot/pull/5937) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
127
|
+
|
|
128
|
+
|
|
4
129
|
## [v27.16.3] - 2025-09-18
|
|
5
130
|
### :bug: Bug Fixes
|
|
6
131
|
- [`d127051`](https://github.com/tobymao/sqlglot/commit/d1270517c3e124ca59caf29e4506eb3848f7452e) - precedence issue with column operator parsing *(PR [#5914](https://github.com/tobymao/sqlglot/pull/5914) by [@georgesittas](https://github.com/georgesittas))*
|
|
@@ -7393,3 +7518,5 @@ Changelog
|
|
|
7393
7518
|
[v27.16.1]: https://github.com/tobymao/sqlglot/compare/v27.16.0...v27.16.1
|
|
7394
7519
|
[v27.16.2]: https://github.com/tobymao/sqlglot/compare/v27.16.1...v27.16.2
|
|
7395
7520
|
[v27.16.3]: https://github.com/tobymao/sqlglot/compare/v27.16.2...v27.16.3
|
|
7521
|
+
[v27.17.0]: https://github.com/tobymao/sqlglot/compare/v27.16.3...v27.17.0
|
|
7522
|
+
[v27.18.0]: https://github.com/tobymao/sqlglot/compare/v27.17.0...v27.18.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 27.
|
|
3
|
+
Version: 27.19.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
|
|
@@ -39,7 +39,7 @@ Dynamic: provides-extra
|
|
|
39
39
|
|
|
40
40
|

|
|
41
41
|
|
|
42
|
-
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [
|
|
42
|
+
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [31 different dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects.
|
|
43
43
|
|
|
44
44
|
It is a very comprehensive generic SQL parser with a robust [test suite](https://github.com/tobymao/sqlglot/blob/main/tests/). It is also quite [performant](#benchmarks), while being written purely in Python.
|
|
45
45
|
|
|
@@ -613,6 +613,7 @@ x + interval '1' month
|
|
|
613
613
|
| RisingWave | Community |
|
|
614
614
|
| SingleStore | Community |
|
|
615
615
|
| Snowflake | Official |
|
|
616
|
+
| Solr | Community |
|
|
616
617
|
| Spark | Official |
|
|
617
618
|
| SQLite | Official |
|
|
618
619
|
| StarRocks | Official |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [
|
|
3
|
+
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [31 different dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects.
|
|
4
4
|
|
|
5
5
|
It is a very comprehensive generic SQL parser with a robust [test suite](https://github.com/tobymao/sqlglot/blob/main/tests/). It is also quite [performant](#benchmarks), while being written purely in Python.
|
|
6
6
|
|
|
@@ -574,6 +574,7 @@ x + interval '1' month
|
|
|
574
574
|
| RisingWave | Community |
|
|
575
575
|
| SingleStore | Community |
|
|
576
576
|
| Snowflake | Official |
|
|
577
|
+
| Solr | Community |
|
|
577
578
|
| Spark | Official |
|
|
578
579
|
| SQLite | Official |
|
|
579
580
|
| StarRocks | Official |
|
|
@@ -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.19.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (27, 19, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g1471306ed'
|
|
@@ -754,15 +754,31 @@ class BigQuery(Dialect):
|
|
|
754
754
|
SUPPORTS_IMPLICIT_UNNEST = True
|
|
755
755
|
JOINS_HAVE_EQUAL_PRECEDENCE = True
|
|
756
756
|
|
|
757
|
-
# BigQuery does not allow ASC/DESC to be used as an identifier
|
|
758
|
-
ID_VAR_TOKENS =
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
757
|
+
# BigQuery does not allow ASC/DESC to be used as an identifier, allows GRANT as an identifier
|
|
758
|
+
ID_VAR_TOKENS = {
|
|
759
|
+
*parser.Parser.ID_VAR_TOKENS,
|
|
760
|
+
TokenType.GRANT,
|
|
761
|
+
} - {TokenType.ASC, TokenType.DESC}
|
|
762
|
+
|
|
763
|
+
ALIAS_TOKENS = {
|
|
764
|
+
*parser.Parser.ALIAS_TOKENS,
|
|
765
|
+
TokenType.GRANT,
|
|
766
|
+
} - {TokenType.ASC, TokenType.DESC}
|
|
767
|
+
|
|
768
|
+
TABLE_ALIAS_TOKENS = {
|
|
769
|
+
*parser.Parser.TABLE_ALIAS_TOKENS,
|
|
770
|
+
TokenType.GRANT,
|
|
771
|
+
} - {TokenType.ASC, TokenType.DESC}
|
|
772
|
+
|
|
773
|
+
COMMENT_TABLE_ALIAS_TOKENS = {
|
|
774
|
+
*parser.Parser.COMMENT_TABLE_ALIAS_TOKENS,
|
|
775
|
+
TokenType.GRANT,
|
|
776
|
+
} - {TokenType.ASC, TokenType.DESC}
|
|
777
|
+
|
|
778
|
+
UPDATE_ALIAS_TOKENS = {
|
|
779
|
+
*parser.Parser.UPDATE_ALIAS_TOKENS,
|
|
780
|
+
TokenType.GRANT,
|
|
781
|
+
} - {TokenType.ASC, TokenType.DESC}
|
|
766
782
|
|
|
767
783
|
FUNCTIONS = {
|
|
768
784
|
**parser.Parser.FUNCTIONS,
|
|
@@ -99,6 +99,7 @@ class Dialects(str, Enum):
|
|
|
99
99
|
REDSHIFT = "redshift"
|
|
100
100
|
RISINGWAVE = "risingwave"
|
|
101
101
|
SNOWFLAKE = "snowflake"
|
|
102
|
+
SOLR = "solr"
|
|
102
103
|
SPARK = "spark"
|
|
103
104
|
SPARK2 = "spark2"
|
|
104
105
|
SQLITE = "sqlite"
|
|
@@ -291,6 +292,12 @@ class _Dialect(type):
|
|
|
291
292
|
TokenType.SEMI,
|
|
292
293
|
}
|
|
293
294
|
|
|
295
|
+
klass.VALID_INTERVAL_UNITS = {
|
|
296
|
+
*klass.VALID_INTERVAL_UNITS,
|
|
297
|
+
*klass.DATE_PART_MAPPING.keys(),
|
|
298
|
+
*klass.DATE_PART_MAPPING.values(),
|
|
299
|
+
}
|
|
300
|
+
|
|
294
301
|
return klass
|
|
295
302
|
|
|
296
303
|
|
|
@@ -551,6 +558,8 @@ class Dialect(metaclass=_Dialect):
|
|
|
551
558
|
IDENTIFIER_START = '"'
|
|
552
559
|
IDENTIFIER_END = '"'
|
|
553
560
|
|
|
561
|
+
VALID_INTERVAL_UNITS: t.Set[str] = set()
|
|
562
|
+
|
|
554
563
|
# Delimiters for bit, hex, byte and unicode literals
|
|
555
564
|
BIT_START: t.Optional[str] = None
|
|
556
565
|
BIT_END: t.Optional[str] = None
|
|
@@ -179,6 +179,21 @@ class MySQL(Dialect):
|
|
|
179
179
|
"%W": "%A",
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
VALID_INTERVAL_UNITS = {
|
|
183
|
+
*Dialect.VALID_INTERVAL_UNITS,
|
|
184
|
+
"SECOND_MICROSECOND",
|
|
185
|
+
"MINUTE_MICROSECOND",
|
|
186
|
+
"MINUTE_SECOND",
|
|
187
|
+
"HOUR_MICROSECOND",
|
|
188
|
+
"HOUR_SECOND",
|
|
189
|
+
"HOUR_MINUTE",
|
|
190
|
+
"DAY_MICROSECOND",
|
|
191
|
+
"DAY_SECOND",
|
|
192
|
+
"DAY_MINUTE",
|
|
193
|
+
"DAY_HOUR",
|
|
194
|
+
"YEAR_MONTH",
|
|
195
|
+
}
|
|
196
|
+
|
|
182
197
|
class Tokenizer(tokens.Tokenizer):
|
|
183
198
|
QUOTES = ["'", '"']
|
|
184
199
|
COMMENTS = ["--", "#", ("/*", "*/")]
|
|
@@ -532,20 +532,26 @@ class Snowflake(Dialect):
|
|
|
532
532
|
exp.DataType.Type.INT: {
|
|
533
533
|
*Dialect.TYPE_TO_EXPRESSIONS[exp.DataType.Type.INT],
|
|
534
534
|
exp.Ascii,
|
|
535
|
+
exp.ByteLength,
|
|
535
536
|
exp.Length,
|
|
537
|
+
exp.RtrimmedLength,
|
|
536
538
|
exp.BitLength,
|
|
537
539
|
exp.Levenshtein,
|
|
540
|
+
exp.JarowinklerSimilarity,
|
|
541
|
+
exp.StrPosition,
|
|
538
542
|
},
|
|
539
543
|
exp.DataType.Type.VARCHAR: {
|
|
540
544
|
*Dialect.TYPE_TO_EXPRESSIONS[exp.DataType.Type.VARCHAR],
|
|
541
545
|
exp.Base64DecodeString,
|
|
542
546
|
exp.Base64Encode,
|
|
547
|
+
exp.DecompressString,
|
|
543
548
|
exp.MD5,
|
|
544
549
|
exp.AIAgg,
|
|
545
550
|
exp.AIClassify,
|
|
546
551
|
exp.AISummarizeAgg,
|
|
547
552
|
exp.Chr,
|
|
548
553
|
exp.Collate,
|
|
554
|
+
exp.Collation,
|
|
549
555
|
exp.HexDecodeString,
|
|
550
556
|
exp.HexEncode,
|
|
551
557
|
exp.Initcap,
|
|
@@ -562,6 +568,7 @@ class Snowflake(Dialect):
|
|
|
562
568
|
*Dialect.TYPE_TO_EXPRESSIONS[exp.DataType.Type.BINARY],
|
|
563
569
|
exp.Base64DecodeBinary,
|
|
564
570
|
exp.Compress,
|
|
571
|
+
exp.DecompressBinary,
|
|
565
572
|
exp.MD5Digest,
|
|
566
573
|
exp.SHA1Digest,
|
|
567
574
|
exp.SHA2Digest,
|
|
@@ -575,6 +582,10 @@ class Snowflake(Dialect):
|
|
|
575
582
|
exp.DataType.Type.ARRAY: {
|
|
576
583
|
exp.Split,
|
|
577
584
|
},
|
|
585
|
+
exp.DataType.Type.OBJECT: {
|
|
586
|
+
exp.ParseUrl,
|
|
587
|
+
exp.ParseIp,
|
|
588
|
+
},
|
|
578
589
|
}
|
|
579
590
|
|
|
580
591
|
ANNOTATORS = {
|
|
@@ -588,7 +599,9 @@ class Snowflake(Dialect):
|
|
|
588
599
|
expr_type: lambda self, e: self._annotate_by_args(e, "this")
|
|
589
600
|
for expr_type in (
|
|
590
601
|
exp.Left,
|
|
602
|
+
exp.Pad,
|
|
591
603
|
exp.Right,
|
|
604
|
+
exp.Stuff,
|
|
592
605
|
exp.Substring,
|
|
593
606
|
)
|
|
594
607
|
},
|
|
@@ -726,6 +739,9 @@ class Snowflake(Dialect):
|
|
|
726
739
|
"NULLIFZERO": _build_if_from_nullifzero,
|
|
727
740
|
"OBJECT_CONSTRUCT": _build_object_construct,
|
|
728
741
|
"OCTET_LENGTH": exp.ByteLength.from_arg_list,
|
|
742
|
+
"PARSE_URL": lambda args: exp.ParseUrl(
|
|
743
|
+
this=seq_get(args, 0), permissive=seq_get(args, 1)
|
|
744
|
+
),
|
|
729
745
|
"REGEXP_EXTRACT_ALL": _build_regexp_extract(exp.RegexpExtractAll),
|
|
730
746
|
"REGEXP_REPLACE": _build_regexp_replace,
|
|
731
747
|
"REGEXP_SUBSTR": _build_regexp_extract(exp.RegexpExtract),
|
|
@@ -1503,13 +1519,23 @@ class Snowflake(Dialect):
|
|
|
1503
1519
|
|
|
1504
1520
|
def datatype_sql(self, expression: exp.DataType) -> str:
|
|
1505
1521
|
expressions = expression.expressions
|
|
1506
|
-
if (
|
|
1507
|
-
expressions
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1522
|
+
if expressions and expression.is_type(*exp.DataType.STRUCT_TYPES):
|
|
1523
|
+
for field_type in expressions:
|
|
1524
|
+
# The correct syntax is OBJECT [ (<key> <value_type [NOT NULL] [, ...]) ]
|
|
1525
|
+
if isinstance(field_type, exp.DataType):
|
|
1526
|
+
return "OBJECT"
|
|
1527
|
+
if (
|
|
1528
|
+
isinstance(field_type, exp.ColumnDef)
|
|
1529
|
+
and field_type.this
|
|
1530
|
+
and field_type.this.is_string
|
|
1531
|
+
):
|
|
1532
|
+
# Doing OBJECT('foo' VARCHAR) is invalid snowflake Syntax. Moreover, besides
|
|
1533
|
+
# converting 'foo' into an identifier, we also need to quote it because these
|
|
1534
|
+
# keys are case-sensitive. For example:
|
|
1535
|
+
#
|
|
1536
|
+
# WITH t AS (SELECT OBJECT_CONSTRUCT('x', 'y') AS c) SELECT c:x FROM t -- correct
|
|
1537
|
+
# WITH t AS (SELECT OBJECT_CONSTRUCT('x', 'y') AS c) SELECT c:X FROM t -- incorrect, returns NULL
|
|
1538
|
+
field_type.this.replace(exp.to_identifier(field_type.name, quoted=True))
|
|
1513
1539
|
|
|
1514
1540
|
return super().datatype_sql(expression)
|
|
1515
1541
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from sqlglot import exp, parser, tokens
|
|
2
|
+
from sqlglot.dialects.dialect import Dialect, NormalizationStrategy
|
|
3
|
+
from sqlglot.tokens import TokenType
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Solr(Dialect):
|
|
10
|
+
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_INSENSITIVE
|
|
11
|
+
DPIPE_IS_STRING_CONCAT = False
|
|
12
|
+
SUPPORTS_SEMI_ANTI_JOIN = False
|
|
13
|
+
|
|
14
|
+
class Parser(parser.Parser):
|
|
15
|
+
DISJUNCTION = {
|
|
16
|
+
**parser.Parser.DISJUNCTION,
|
|
17
|
+
TokenType.DPIPE: exp.Or,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class Tokenizer(tokens.Tokenizer):
|
|
21
|
+
QUOTES = ["'"]
|
|
22
|
+
IDENTIFIERS = ["`"]
|
|
@@ -5531,6 +5531,10 @@ class EuclideanDistance(Func):
|
|
|
5531
5531
|
arg_types = {"this": True, "expression": True}
|
|
5532
5532
|
|
|
5533
5533
|
|
|
5534
|
+
class JarowinklerSimilarity(Func):
|
|
5535
|
+
arg_types = {"this": True, "expression": True}
|
|
5536
|
+
|
|
5537
|
+
|
|
5534
5538
|
class AggFunc(Func):
|
|
5535
5539
|
pass
|
|
5536
5540
|
|
|
@@ -6022,6 +6026,10 @@ class Collate(Binary, Func):
|
|
|
6022
6026
|
pass
|
|
6023
6027
|
|
|
6024
6028
|
|
|
6029
|
+
class Collation(Func):
|
|
6030
|
+
pass
|
|
6031
|
+
|
|
6032
|
+
|
|
6025
6033
|
class Ceil(Func):
|
|
6026
6034
|
arg_types = {"this": True, "decimals": False, "to": False}
|
|
6027
6035
|
_sql_names = ["CEIL", "CEILING"]
|
|
@@ -6483,6 +6491,7 @@ class HexDecodeString(Func):
|
|
|
6483
6491
|
pass
|
|
6484
6492
|
|
|
6485
6493
|
|
|
6494
|
+
# https://docs.snowflake.com/en/sql-reference/functions/hex_encode
|
|
6486
6495
|
class HexEncode(Func):
|
|
6487
6496
|
arg_types = {"this": True, "case": False}
|
|
6488
6497
|
|
|
@@ -6493,6 +6502,16 @@ class Compress(Func):
|
|
|
6493
6502
|
arg_types = {"this": True, "method": False}
|
|
6494
6503
|
|
|
6495
6504
|
|
|
6505
|
+
# Snowflake: https://docs.snowflake.com/en/sql-reference/functions/decompress_binary
|
|
6506
|
+
class DecompressBinary(Func):
|
|
6507
|
+
arg_types = {"this": True, "method": True}
|
|
6508
|
+
|
|
6509
|
+
|
|
6510
|
+
# Snowflake: https://docs.snowflake.com/en/sql-reference/functions/decompress_string
|
|
6511
|
+
class DecompressString(Func):
|
|
6512
|
+
arg_types = {"this": True, "method": True}
|
|
6513
|
+
|
|
6514
|
+
|
|
6496
6515
|
class LowerHex(Hex):
|
|
6497
6516
|
pass
|
|
6498
6517
|
|
|
@@ -6869,6 +6888,16 @@ class ParseJSON(Func):
|
|
|
6869
6888
|
arg_types = {"this": True, "expression": False, "safe": False}
|
|
6870
6889
|
|
|
6871
6890
|
|
|
6891
|
+
# Snowflake: https://docs.snowflake.com/en/sql-reference/functions/parse_url
|
|
6892
|
+
# Databricks: https://docs.databricks.com/aws/en/sql/language-manual/functions/parse_url
|
|
6893
|
+
class ParseUrl(Func):
|
|
6894
|
+
arg_types = {"this": True, "part_to_extract": False, "key": False, "permissive": False}
|
|
6895
|
+
|
|
6896
|
+
|
|
6897
|
+
class ParseIp(Func):
|
|
6898
|
+
arg_types = {"this": True, "type": True, "permissive": False}
|
|
6899
|
+
|
|
6900
|
+
|
|
6872
6901
|
class ParseTime(Func):
|
|
6873
6902
|
arg_types = {"this": True, "format": True}
|
|
6874
6903
|
|
|
@@ -6899,6 +6928,10 @@ class Length(Func):
|
|
|
6899
6928
|
_sql_names = ["LENGTH", "LEN", "CHAR_LENGTH", "CHARACTER_LENGTH"]
|
|
6900
6929
|
|
|
6901
6930
|
|
|
6931
|
+
class RtrimmedLength(Func):
|
|
6932
|
+
pass
|
|
6933
|
+
|
|
6934
|
+
|
|
6902
6935
|
class BitLength(Func):
|
|
6903
6936
|
pass
|
|
6904
6937
|
|
|
@@ -809,6 +809,8 @@ class Parser(metaclass=_Parser):
|
|
|
809
809
|
exp.DataType: lambda self: self._parse_types(allow_identifiers=False, schema=True),
|
|
810
810
|
exp.Expression: lambda self: self._parse_expression(),
|
|
811
811
|
exp.From: lambda self: self._parse_from(joins=True),
|
|
812
|
+
exp.GrantPrincipal: lambda self: self._parse_grant_principal(),
|
|
813
|
+
exp.GrantPrivilege: lambda self: self._parse_grant_privilege(),
|
|
812
814
|
exp.Group: lambda self: self._parse_group(),
|
|
813
815
|
exp.Having: lambda self: self._parse_having(),
|
|
814
816
|
exp.Hint: lambda self: self._parse_hint_body(),
|
|
@@ -3123,21 +3125,26 @@ class Parser(metaclass=_Parser):
|
|
|
3123
3125
|
)
|
|
3124
3126
|
|
|
3125
3127
|
def _parse_update(self) -> exp.Update:
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
"
|
|
3134
|
-
|
|
3135
|
-
"
|
|
3136
|
-
|
|
3137
|
-
"
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3128
|
+
kwargs: t.Dict[str, t.Any] = {
|
|
3129
|
+
"this": self._parse_table(joins=True, alias_tokens=self.UPDATE_ALIAS_TOKENS),
|
|
3130
|
+
}
|
|
3131
|
+
while self._curr:
|
|
3132
|
+
if self._match(TokenType.SET):
|
|
3133
|
+
kwargs["expressions"] = self._parse_csv(self._parse_equality)
|
|
3134
|
+
elif self._match(TokenType.RETURNING, advance=False):
|
|
3135
|
+
kwargs["returning"] = self._parse_returning()
|
|
3136
|
+
elif self._match(TokenType.FROM, advance=False):
|
|
3137
|
+
kwargs["from"] = self._parse_from(joins=True)
|
|
3138
|
+
elif self._match(TokenType.WHERE, advance=False):
|
|
3139
|
+
kwargs["where"] = self._parse_where()
|
|
3140
|
+
elif self._match(TokenType.ORDER_BY, advance=False):
|
|
3141
|
+
kwargs["order"] = self._parse_order()
|
|
3142
|
+
elif self._match(TokenType.LIMIT, advance=False):
|
|
3143
|
+
kwargs["limit"] = self._parse_limit()
|
|
3144
|
+
else:
|
|
3145
|
+
break
|
|
3146
|
+
|
|
3147
|
+
return self.expression(exp.Update, **kwargs)
|
|
3141
3148
|
|
|
3142
3149
|
def _parse_use(self) -> exp.Use:
|
|
3143
3150
|
return self.expression(
|
|
@@ -4240,9 +4247,11 @@ class Parser(metaclass=_Parser):
|
|
|
4240
4247
|
)
|
|
4241
4248
|
|
|
4242
4249
|
def _parse_unnest(self, with_alias: bool = True) -> t.Optional[exp.Unnest]:
|
|
4243
|
-
if not self.
|
|
4250
|
+
if not self._match_pair(TokenType.UNNEST, TokenType.L_PAREN, advance=False):
|
|
4244
4251
|
return None
|
|
4245
4252
|
|
|
4253
|
+
self._advance()
|
|
4254
|
+
|
|
4246
4255
|
expressions = self._parse_wrapped_csv(self._parse_equality)
|
|
4247
4256
|
offset = self._match_pair(TokenType.WITH, TokenType.ORDINALITY)
|
|
4248
4257
|
|
|
@@ -5104,7 +5113,8 @@ class Parser(metaclass=_Parser):
|
|
|
5104
5113
|
isinstance(this, exp.Column)
|
|
5105
5114
|
and not this.table
|
|
5106
5115
|
and not this.this.quoted
|
|
5107
|
-
and
|
|
5116
|
+
and self._curr
|
|
5117
|
+
and self._curr.text.upper() not in self.dialect.VALID_INTERVAL_UNITS
|
|
5108
5118
|
):
|
|
5109
5119
|
self._retreat(index)
|
|
5110
5120
|
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 27.
|
|
3
|
+
Version: 27.19.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
|
|
@@ -39,7 +39,7 @@ Dynamic: provides-extra
|
|
|
39
39
|
|
|
40
40
|

|
|
41
41
|
|
|
42
|
-
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [
|
|
42
|
+
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [31 different dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects.
|
|
43
43
|
|
|
44
44
|
It is a very comprehensive generic SQL parser with a robust [test suite](https://github.com/tobymao/sqlglot/blob/main/tests/). It is also quite [performant](#benchmarks), while being written purely in Python.
|
|
45
45
|
|
|
@@ -613,6 +613,7 @@ x + interval '1' month
|
|
|
613
613
|
| RisingWave | Community |
|
|
614
614
|
| SingleStore | Community |
|
|
615
615
|
| Snowflake | Official |
|
|
616
|
+
| Solr | Community |
|
|
616
617
|
| Spark | Official |
|
|
617
618
|
| SQLite | Official |
|
|
618
619
|
| StarRocks | Official |
|
|
@@ -61,6 +61,7 @@ sqlglot/dialects/redshift.py
|
|
|
61
61
|
sqlglot/dialects/risingwave.py
|
|
62
62
|
sqlglot/dialects/singlestore.py
|
|
63
63
|
sqlglot/dialects/snowflake.py
|
|
64
|
+
sqlglot/dialects/solr.py
|
|
64
65
|
sqlglot/dialects/spark.py
|
|
65
66
|
sqlglot/dialects/spark2.py
|
|
66
67
|
sqlglot/dialects/sqlite.py
|
|
@@ -154,6 +155,7 @@ tests/dialects/test_redshift.py
|
|
|
154
155
|
tests/dialects/test_risingwave.py
|
|
155
156
|
tests/dialects/test_singlestore.py
|
|
156
157
|
tests/dialects/test_snowflake.py
|
|
158
|
+
tests/dialects/test_solr.py
|
|
157
159
|
tests/dialects/test_spark.py
|
|
158
160
|
tests/dialects/test_sqlite.py
|
|
159
161
|
tests/dialects/test_starrocks.py
|