sqlglot 30.9.0__tar.gz → 30.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-30.9.0 → sqlglot-30.10.0}/CHANGELOG.md +119 -0
- {sqlglot-30.9.0/sqlglot.egg-info → sqlglot-30.10.0}/PKG-INFO +3 -3
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/functions.py +6 -1
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/properties.py +4 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/query.py +4 -4
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generator.py +8 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/bigquery.py +6 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/databricks.py +4 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/duckdb.py +27 -1
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/presto.py +2 -6
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/snowflake.py +0 -3
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/starrocks.py +5 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/merge_subqueries.py +1 -1
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify_columns.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parser.py +13 -9
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/bigquery.py +7 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/clickhouse.py +1 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/databricks.py +5 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/snowflake.py +9 -8
- {sqlglot-30.9.0 → sqlglot-30.10.0/sqlglot.egg-info}/PKG-INFO +3 -3
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_bigquery.py +1 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_clickhouse.py +7 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_databricks.py +6 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_exasol.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_hive.py +3 -3
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_snowflake.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_starrocks.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns.sql +12 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_build.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.10.0}/.gitignore +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/.gitmodules +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/.gitpod.yml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/AGENTS.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/CLAUDE.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/LICENSE +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/MANIFEST.in +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/Makefile +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/README.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/pyproject.toml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/setup.cfg +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/setup.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/dialect.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/array.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/core.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/string.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/expressions/temporal.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/generators/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/scope.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/simplify.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/time.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/tokenizer_core.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/tokens.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/transforms.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/bigquery.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/snowflake.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot.egg-info/SOURCES.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglot.png +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/sqlglotc/setup.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_dialect.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/dialects/test_tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/annotate_functions.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/helpers.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_diff.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_docs.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_errors.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_executor.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_generator.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_helper.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_lineage.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_optimizer.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_parser.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_schema.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_serde.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_time.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.10.0}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.9.0] - 2026-06-04
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`a40dde9`](https://github.com/tobymao/sqlglot/commit/a40dde9d3992b2b1df4f4ff5dccde240d618dabd) - delimited global/temp table references closes [#7657](https://github.com/tobymao/sqlglot/pull/7657) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
7
|
+
|
|
8
|
+
delimited global/temp table references closes #7657
|
|
9
|
+
|
|
10
|
+
- due to [`cc3f980`](https://github.com/tobymao/sqlglot/commit/cc3f98093d4968400a32434cd23deee6817a21c8) - improve datatype typing *(PR [#7654](https://github.com/tobymao/sqlglot/pull/7654) by [@OutSquareCapital](https://github.com/OutSquareCapital))*:
|
|
11
|
+
|
|
12
|
+
improve datatype typing (#7654)
|
|
13
|
+
|
|
14
|
+
- due to [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
15
|
+
|
|
16
|
+
rename `Distance3d` to `DistanceNd`
|
|
17
|
+
|
|
18
|
+
- due to [`0e9e0a4`](https://github.com/tobymao/sqlglot/commit/0e9e0a483b3207a573ba07023d4071d1b9ddc181) - qualify column reference in NULLS LAST CASE simulation *(PR [#7641](https://github.com/tobymao/sqlglot/pull/7641) by [@brdbry](https://github.com/brdbry))*:
|
|
19
|
+
|
|
20
|
+
qualify column reference in NULLS LAST CASE simulation (#7641)
|
|
21
|
+
|
|
22
|
+
- due to [`edf731c`](https://github.com/tobymao/sqlglot/commit/edf731c119d16de54260ea9098acd4e9dab60d94) - propagate type through Lag/Lead/NthValue window functions [CLAUDE] *(PR [#7652](https://github.com/tobymao/sqlglot/pull/7652) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
|
|
23
|
+
|
|
24
|
+
propagate type through Lag/Lead/NthValue window functions [CLAUDE] (#7652)
|
|
25
|
+
|
|
26
|
+
- due to [`4698d08`](https://github.com/tobymao/sqlglot/commit/4698d087f107c665b6a04ac3329e3b86081367b8) - annotate ranking window functions with constant return types [CLAUDE] *(PR [#7658](https://github.com/tobymao/sqlglot/pull/7658) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
|
|
27
|
+
|
|
28
|
+
annotate ranking window functions with constant return types [CLAUDE] (#7658)
|
|
29
|
+
|
|
30
|
+
- due to [`0be0887`](https://github.com/tobymao/sqlglot/commit/0be088726ed210eb3ae3c8632f9f89cb69289b44) - skip unnesting NOT IN to preserve NULL semantics *(PR [#7671](https://github.com/tobymao/sqlglot/pull/7671) by [@georgesittas](https://github.com/georgesittas))*:
|
|
31
|
+
|
|
32
|
+
skip unnesting NOT IN to preserve NULL semantics (#7671)
|
|
33
|
+
|
|
34
|
+
- due to [`cd06eb6`](https://github.com/tobymao/sqlglot/commit/cd06eb60af44fdf56e7d5dee9fe173e56bc6f521) - support INSERT IGNORE and offset-only limits [CODEX] *(PR [#7674](https://github.com/tobymao/sqlglot/pull/7674) by [@russellromney](https://github.com/russellromney))*:
|
|
35
|
+
|
|
36
|
+
support INSERT IGNORE and offset-only limits [CODEX] (#7674)
|
|
37
|
+
|
|
38
|
+
- due to [`c3fa1ce`](https://github.com/tobymao/sqlglot/commit/c3fa1ced5d7fce8f3546cc01f9f604ca4ad41859) - CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] *(PR [#7661](https://github.com/tobymao/sqlglot/pull/7661) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
|
|
39
|
+
|
|
40
|
+
CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] (#7661)
|
|
41
|
+
|
|
42
|
+
- due to [`603433d`](https://github.com/tobymao/sqlglot/commit/603433d273b5f6cca8ddb2da9f0336515b985755) - fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
|
|
43
|
+
|
|
44
|
+
fix for Snowflake transpilation issue related to PIVOT and string literal column names (#7660)
|
|
45
|
+
|
|
46
|
+
- due to [`3e42f92`](https://github.com/tobymao/sqlglot/commit/3e42f927cf1deb65eafc0eea5904507fe613795b) - parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` *(PR [#7702](https://github.com/tobymao/sqlglot/pull/7702) by [@georgesittas](https://github.com/georgesittas))*:
|
|
47
|
+
|
|
48
|
+
parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` (#7702)
|
|
49
|
+
|
|
50
|
+
- due to [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
51
|
+
|
|
52
|
+
bump sqlglot-mypy
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### :sparkles: New Features
|
|
56
|
+
- [`f8b184e`](https://github.com/tobymao/sqlglot/commit/f8b184e3e62ca9964dc8f4b5cbf0b52a1913dfce) - **mysql**: transpile `MAKE_INTERVAL` closes [#7646](https://github.com/tobymao/sqlglot/pull/7646) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
57
|
+
- [`2f2dd8c`](https://github.com/tobymao/sqlglot/commit/2f2dd8cbd39350850b5a4f40946b1f53c1f8c4df) - **duckdb**: Add transpilation unsupported for GET_IGNORE_CASE function *(PR [#7642](https://github.com/tobymao/sqlglot/pull/7642) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
58
|
+
- [`10af777`](https://github.com/tobymao/sqlglot/commit/10af7778250f17d262626b7042f7d7e4f4f9c5e2) - **tsql**: support FOR JSON clause [CLAUDE] *(PR [#7649](https://github.com/tobymao/sqlglot/pull/7649) by [@lvanoverberghe](https://github.com/lvanoverberghe))*
|
|
59
|
+
- [`cc448ac`](https://github.com/tobymao/sqlglot/commit/cc448ac4809f52b7d458aef220eee8ff7b838d7f) - **postgres**: add support for PostGIS 3D distance operator <<->> *(PR [#7655](https://github.com/tobymao/sqlglot/pull/7655) by [@vnataliia](https://github.com/vnataliia))*
|
|
60
|
+
- [`edf731c`](https://github.com/tobymao/sqlglot/commit/edf731c119d16de54260ea9098acd4e9dab60d94) - **annotate_types**: propagate type through Lag/Lead/NthValue window functions [CLAUDE] *(PR [#7652](https://github.com/tobymao/sqlglot/pull/7652) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
61
|
+
- [`4698d08`](https://github.com/tobymao/sqlglot/commit/4698d087f107c665b6a04ac3329e3b86081367b8) - **annotate_types**: annotate ranking window functions with constant return types [CLAUDE] *(PR [#7658](https://github.com/tobymao/sqlglot/pull/7658) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
62
|
+
- [`33b31be`](https://github.com/tobymao/sqlglot/commit/33b31be8255d45a464cd119fe4d16c3438ff3be3) - **snowflake**: support `OBJECT_AGG(DISTINCT ...)` *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
63
|
+
- [`6084d34`](https://github.com/tobymao/sqlglot/commit/6084d3409571f607c2783e7363c5ec7d34fd1e9c) - **oracle**: add support for `^=` not-equals operator closes [#7662](https://github.com/tobymao/sqlglot/pull/7662) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
64
|
+
- [`e0c1933`](https://github.com/tobymao/sqlglot/commit/e0c193375fa590e2dbc7ea76a40c68b9cbd2a3ed) - **optimizer**: annotate types for CovarPop/Samp, PercentileCont/Disc, and WithinGroup [CLAUDE] *(PR [#7656](https://github.com/tobymao/sqlglot/pull/7656) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
65
|
+
- [`e5c6b6a`](https://github.com/tobymao/sqlglot/commit/e5c6b6a8b7e3ecd3abe4f3cc69178b2b51ddb8f7) - **bigquery**: support LOAD DATA INTO TEMP TABLE syntax *(PR [#7675](https://github.com/tobymao/sqlglot/pull/7675) by [@simonlourson](https://github.com/simonlourson))*
|
|
66
|
+
- [`9e6faab`](https://github.com/tobymao/sqlglot/commit/9e6faabb7c317eda92aa3b08736354017ee6cf0f) - **bigquery**: support LOAD DATA INTO TEMP TABLE syntax *(PR [#7675](https://github.com/tobymao/sqlglot/pull/7675) by [@simonlourson](https://github.com/simonlourson))*
|
|
67
|
+
- [`bd4a397`](https://github.com/tobymao/sqlglot/commit/bd4a3971f4c7ed9b297bf2d37790596b01ea52f0) - **oracle**: support `DEFAULT` clause in `TO_NUMBER` func closes [#7685](https://github.com/tobymao/sqlglot/pull/7685) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
68
|
+
- [`96a90be`](https://github.com/tobymao/sqlglot/commit/96a90befb8493a70c6bd98e7f252480b23803eb1) - **duckdb**: add support for overloaded `MACRO` DDL syntax *(PR [#7690](https://github.com/tobymao/sqlglot/pull/7690) by [@georgesittas](https://github.com/georgesittas))*
|
|
69
|
+
- :arrow_lower_right: *addresses issue [#7688](https://github.com/tobymao/sqlglot/issues/7688) opened by [@VBobCat](https://github.com/VBobCat)*
|
|
70
|
+
- [`13a8b8d`](https://github.com/tobymao/sqlglot/commit/13a8b8db69d97613b2444fc9aa0721f7947a9c87) - **exasol**: transpile MySQL `SHOW DATABASES/SCHEMAS` to `SELECT` over `SYS.EXA_SCHEMAS` *(PR [#7695](https://github.com/tobymao/sqlglot/pull/7695) by [@mariadb-AllenHerrera](https://github.com/mariadb-AllenHerrera))*
|
|
71
|
+
- [`e23a9ee`](https://github.com/tobymao/sqlglot/commit/e23a9eeceaff20e9655eb323e6a364f83a10acf2) - **duckdb**: Add transpilation support for BOOLEAN and TEXT cases of TRY_CAST function *(PR [#7681](https://github.com/tobymao/sqlglot/pull/7681) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
72
|
+
|
|
73
|
+
### :bug: Bug Fixes
|
|
74
|
+
- [`0a43a44`](https://github.com/tobymao/sqlglot/commit/0a43a44d7613de5e39d9b72e706af7510a56b6a8) - **optimizer**: guard against None type in _coerce_datediff_args *(PR [#7647](https://github.com/tobymao/sqlglot/pull/7647) by [@fangzheng](https://github.com/fangzheng))*
|
|
75
|
+
- [`a40dde9`](https://github.com/tobymao/sqlglot/commit/a40dde9d3992b2b1df4f4ff5dccde240d618dabd) - **tsql**: delimited global/temp table references closes [#7657](https://github.com/tobymao/sqlglot/pull/7657) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
76
|
+
- [`c19bb4b`](https://github.com/tobymao/sqlglot/commit/c19bb4b3d7282f2da5eea7f3dc76c1a270ff909d) - **parser**: Avoid `__tmp#` CTEs getting replaced with outer CTEs for pipe syntax *(PR [#7659](https://github.com/tobymao/sqlglot/pull/7659) by [@sean-rose](https://github.com/sean-rose))*
|
|
77
|
+
- [`0e9e0a4`](https://github.com/tobymao/sqlglot/commit/0e9e0a483b3207a573ba07023d4071d1b9ddc181) - **mysql**: qualify column reference in NULLS LAST CASE simulation *(PR [#7641](https://github.com/tobymao/sqlglot/pull/7641) by [@brdbry](https://github.com/brdbry))*
|
|
78
|
+
- [`b748094`](https://github.com/tobymao/sqlglot/commit/b74809445223d6d02b4b26a45cc72119e09ef574) - raise ParseError, not IndexError, on an unclosed JSONPath filter *(PR [#7665](https://github.com/tobymao/sqlglot/pull/7665) by [@c-tonneslan](https://github.com/c-tonneslan))*
|
|
79
|
+
- [`f173fde`](https://github.com/tobymao/sqlglot/commit/f173fde381c2a1eeaa69127e56d1d2087828f3b7) - **optimizer**: `unnest_subqueries` produces invalid column references when subquery contains a UNION *(PR [#7667](https://github.com/tobymao/sqlglot/pull/7667) by [@snovik75](https://github.com/snovik75))*
|
|
80
|
+
- :arrow_lower_right: *fixes issue [#7666](https://github.com/tobymao/sqlglot/issues/7666) opened by [@wzhseno](https://github.com/wzhseno)*
|
|
81
|
+
- [`0be0887`](https://github.com/tobymao/sqlglot/commit/0be088726ed210eb3ae3c8632f9f89cb69289b44) - **optimizer**: skip unnesting NOT IN to preserve NULL semantics *(PR [#7671](https://github.com/tobymao/sqlglot/pull/7671) by [@georgesittas](https://github.com/georgesittas))*
|
|
82
|
+
- [`5683e3d`](https://github.com/tobymao/sqlglot/commit/5683e3df9926f25e8d60e65c93851c8035db0cb0) - improve transpilation of `e'...'` strings *(PR [#7677](https://github.com/tobymao/sqlglot/pull/7677) by [@SAY-5](https://github.com/SAY-5))*
|
|
83
|
+
- :arrow_lower_right: *fixes issue [#7676](https://github.com/tobymao/sqlglot/issues/7676) opened by [@russellromney](https://github.com/russellromney)*
|
|
84
|
+
- [`a7e21a4`](https://github.com/tobymao/sqlglot/commit/a7e21a49f6c83e2917b9e02fc39c9e4237f4850a) - **duckdb**: add transpilation support for bq func PARSE_TIME *(PR [#7673](https://github.com/tobymao/sqlglot/pull/7673) by [@william-goode](https://github.com/william-goode))*
|
|
85
|
+
- [`c072a26`](https://github.com/tobymao/sqlglot/commit/c072a2635f8c20851c61f829633ad05d353599ae) - **mysql**: joined table `UPDATE` syntax handling *(PR [#7680](https://github.com/tobymao/sqlglot/pull/7680) by [@georgesittas](https://github.com/georgesittas))*
|
|
86
|
+
- :arrow_lower_right: *fixes issue [#7679](https://github.com/tobymao/sqlglot/issues/7679) opened by [@devfros](https://github.com/devfros)*
|
|
87
|
+
- [`cd06eb6`](https://github.com/tobymao/sqlglot/commit/cd06eb60af44fdf56e7d5dee9fe173e56bc6f521) - **sqlite**: support INSERT IGNORE and offset-only limits [CODEX] *(PR [#7674](https://github.com/tobymao/sqlglot/pull/7674) by [@russellromney](https://github.com/russellromney))*
|
|
88
|
+
- [`c3fa1ce`](https://github.com/tobymao/sqlglot/commit/c3fa1ced5d7fce8f3546cc01f9f604ca4ad41859) - **spark**: CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] *(PR [#7661](https://github.com/tobymao/sqlglot/pull/7661) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
89
|
+
- [`07faa10`](https://github.com/tobymao/sqlglot/commit/07faa10723e822d2319f2f41c7099948336d7514) - **postgres**: parse schema-qualified COMMENT ON TYPE, VIEW, SEQUENCE, and INDEX *(PR [#7684](https://github.com/tobymao/sqlglot/pull/7684) by [@devfros](https://github.com/devfros))*
|
|
90
|
+
- :arrow_lower_right: *fixes issue [#7683](https://github.com/tobymao/sqlglot/issues/7683) opened by [@devfros](https://github.com/devfros)*
|
|
91
|
+
- [`08e61b7`](https://github.com/tobymao/sqlglot/commit/08e61b775bd678124bb5e154e950b55e92e64182) - **expressions**: invalidate cached _hash on append() *(commit by [@tobymao](https://github.com/tobymao))*
|
|
92
|
+
- [`5c916ee`](https://github.com/tobymao/sqlglot/commit/5c916eee88264c3d73040b5d00232265cf47a1b2) - **optimizer**: retain set-returning projections in pushdown_projections *(PR [#7686](https://github.com/tobymao/sqlglot/pull/7686) by [@tobymao](https://github.com/tobymao))*
|
|
93
|
+
- [`8520e68`](https://github.com/tobymao/sqlglot/commit/8520e684f0da4b960b258d682f0c73c3858a23f2) - **parser**: pipe syntax AGGREGATE projection order *(PR [#7689](https://github.com/tobymao/sqlglot/pull/7689) by [@geooo109](https://github.com/geooo109))*
|
|
94
|
+
- [`9457cf6`](https://github.com/tobymao/sqlglot/commit/9457cf661659422f718817bf8c4e22f8d4e6ad1f) - multiline comment idempotency in connectors [GEMINI] *(PR [#7691](https://github.com/tobymao/sqlglot/pull/7691) by [@dcolestock](https://github.com/dcolestock))*
|
|
95
|
+
- [`19f5aea`](https://github.com/tobymao/sqlglot/commit/19f5aea982e9cad34210361bae603b4ceba7d167) - **duckdb**: fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
96
|
+
- [`603433d`](https://github.com/tobymao/sqlglot/commit/603433d273b5f6cca8ddb2da9f0336515b985755) - **duckdb**: fix for Snowflake transpilation issue related to PIVOT and string literal column names *(PR [#7660](https://github.com/tobymao/sqlglot/pull/7660) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
97
|
+
- [`98b2b92`](https://github.com/tobymao/sqlglot/commit/98b2b923a6b86b87141c21e8869a55f6c887460f) - **bigquery**: avoid self join auto unnest *(PR [#7697](https://github.com/tobymao/sqlglot/pull/7697) by [@geooo109](https://github.com/geooo109))*
|
|
98
|
+
- [`3e42f92`](https://github.com/tobymao/sqlglot/commit/3e42f927cf1deb65eafc0eea5904507fe613795b) - parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` *(PR [#7702](https://github.com/tobymao/sqlglot/pull/7702) by [@georgesittas](https://github.com/georgesittas))*
|
|
99
|
+
- :arrow_lower_right: *fixes issue [#7698](https://github.com/tobymao/sqlglot/issues/7698) opened by [@gabrielteotonio](https://github.com/gabrielteotonio)*
|
|
100
|
+
- [`a32a69f`](https://github.com/tobymao/sqlglot/commit/a32a69fa9e527977d253391a9caf76271e96fa9e) - **bigquery**: roundtrip for CAST with DATE/TIMESTAMP FORMAT *(PR [#7703](https://github.com/tobymao/sqlglot/pull/7703) by [@geooo109](https://github.com/geooo109))*
|
|
101
|
+
- [`2216a6e`](https://github.com/tobymao/sqlglot/commit/2216a6ed43ce479b29603440d1fb72043c4ff50a) - **bigquery**: preserve domain-scoped project IDs [CLAUDE] *(PR [#7693](https://github.com/tobymao/sqlglot/pull/7693) by [@etonlels](https://github.com/etonlels))*
|
|
102
|
+
- [`ec93edf`](https://github.com/tobymao/sqlglot/commit/ec93edf8873f37294b4c0d0f53627cb1ba2104ff) - make DataType.type return self instead of a clone *(PR [#7708](https://github.com/tobymao/sqlglot/pull/7708) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
103
|
+
|
|
104
|
+
### :zap: Performance Improvements
|
|
105
|
+
- [`35bc1e0`](https://github.com/tobymao/sqlglot/commit/35bc1e02e85b49464a8f47cc76740dfd657a345d) - **optimizer**: skip O(n^2) connector simplification when no operands can combine *(PR [#7687](https://github.com/tobymao/sqlglot/pull/7687) by [@tobymao](https://github.com/tobymao))*
|
|
106
|
+
- [`dcd70a2`](https://github.com/tobymao/sqlglot/commit/dcd70a2aeb84e1b1b9e3a4cc5c5b515ba139a8f9) - cache `gen` dispatch table *(PR [#7705](https://github.com/tobymao/sqlglot/pull/7705) by [@georgesittas](https://github.com/georgesittas))*
|
|
107
|
+
- [`eb35b13`](https://github.com/tobymao/sqlglot/commit/eb35b135925acfad63ced7320cbe4f308eea6912) - improve `__hash__` performance *(PR [#7706](https://github.com/tobymao/sqlglot/pull/7706) by [@georgesittas](https://github.com/georgesittas))*
|
|
108
|
+
|
|
109
|
+
### :recycle: Refactors
|
|
110
|
+
- [`cc3f980`](https://github.com/tobymao/sqlglot/commit/cc3f98093d4968400a32434cd23deee6817a21c8) - **typing**: improve datatype typing *(PR [#7654](https://github.com/tobymao/sqlglot/pull/7654) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
111
|
+
- [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - **postgres**: rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
112
|
+
|
|
113
|
+
### :wrench: Chores
|
|
114
|
+
- [`0399cca`](https://github.com/tobymao/sqlglot/commit/0399cca9a1ec5f248cbe5837ce18da8401de3622) - bump sqlglot-mypy, fix leakcheck *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
115
|
+
- [`1b78667`](https://github.com/tobymao/sqlglot/commit/1b78667da199e6f510ff901a990b23ad728194f5) - bump sqlglot-mypy to post9 *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
116
|
+
- [`b02ed52`](https://github.com/tobymao/sqlglot/commit/b02ed523f3242545e860f1265efc177a734cfd6f) - small clean up for within group *(commit by [@geooo109](https://github.com/geooo109))*
|
|
117
|
+
- [`515e2b0`](https://github.com/tobymao/sqlglot/commit/515e2b0a9a609f3302da8f1095067588dd0a59cb) - bump sqlglot-mypy to 2.1.0.post1 *(PR [#7669](https://github.com/tobymao/sqlglot/pull/7669) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
118
|
+
- [`ec5fb1c`](https://github.com/tobymao/sqlglot/commit/ec5fb1cec5c88ef9a16ed1c73b1c10c4e7abd9e6) - add makefile rule to run only updated tests *(PR [#7692](https://github.com/tobymao/sqlglot/pull/7692) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
119
|
+
- [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
120
|
+
|
|
121
|
+
|
|
4
122
|
## [v30.8.0] - 2026-05-13
|
|
5
123
|
### :boom: BREAKING CHANGES
|
|
6
124
|
- due to [`6944a6c`](https://github.com/tobymao/sqlglot/commit/6944a6c3ff5a9d18f31ddab53239cbce2e702055) - Improve typing annotations for planner, schema, serde, and transforms modules *(PR [#7579](https://github.com/tobymao/sqlglot/pull/7579) by [@OutSquareCapital](https://github.com/OutSquareCapital))*:
|
|
@@ -14467,3 +14585,4 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
14467
14585
|
[v30.6.0]: https://github.com/tobymao/sqlglot/compare/v30.5.0...v30.6.0
|
|
14468
14586
|
[v30.7.0]: https://github.com/tobymao/sqlglot/compare/v30.6.0...v30.7.0
|
|
14469
14587
|
[v30.8.0]: https://github.com/tobymao/sqlglot/compare/v30.7.0...v30.8.0
|
|
14588
|
+
[v30.9.0]: https://github.com/tobymao/sqlglot/compare/v30.8.0...v30.9.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.10.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
|
|
@@ -34,10 +34,10 @@ Requires-Dist: types-pytz; extra == "dev"
|
|
|
34
34
|
Requires-Dist: typing_extensions; extra == "dev"
|
|
35
35
|
Requires-Dist: pyperf; extra == "dev"
|
|
36
36
|
Provides-Extra: c
|
|
37
|
-
Requires-Dist: sqlglotc==30.
|
|
37
|
+
Requires-Dist: sqlglotc==30.10.0; python_version >= "3.10" and extra == "c"
|
|
38
38
|
Provides-Extra: rs
|
|
39
39
|
Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
|
|
40
|
-
Requires-Dist: sqlglotc==30.
|
|
40
|
+
Requires-Dist: sqlglotc==30.10.0; python_version >= "3.10" and extra == "rs"
|
|
41
41
|
Dynamic: license-file
|
|
42
42
|
Dynamic: provides-extra
|
|
43
43
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '30.
|
|
22
|
-
__version_tuple__ = version_tuple = (30,
|
|
21
|
+
__version__ = version = '30.10.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 10, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g982bd166d'
|
|
@@ -70,7 +70,12 @@ class Cast(Expression, Func):
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
class TryCast(Cast):
|
|
73
|
-
arg_types = {
|
|
73
|
+
arg_types = {
|
|
74
|
+
**Cast.arg_types,
|
|
75
|
+
"requires_string": False,
|
|
76
|
+
"null_on_text_overflow": False,
|
|
77
|
+
"probe_date_format": False,
|
|
78
|
+
}
|
|
74
79
|
|
|
75
80
|
|
|
76
81
|
class JSONCast(Cast):
|
|
@@ -75,6 +75,10 @@ class ChecksumProperty(Property):
|
|
|
75
75
|
arg_types = {"on": False, "default": False}
|
|
76
76
|
|
|
77
77
|
|
|
78
|
+
class ClusterProperty(Property):
|
|
79
|
+
arg_types = {"this": False, "expressions": False}
|
|
80
|
+
|
|
81
|
+
|
|
78
82
|
class CollateProperty(Property):
|
|
79
83
|
arg_types = {"this": True, "default": False}
|
|
80
84
|
|
|
@@ -859,8 +859,8 @@ class SkipJSONColumn(Expression):
|
|
|
859
859
|
arg_types = {"regexp": False, "expression": True}
|
|
860
860
|
|
|
861
861
|
|
|
862
|
-
class Cluster(
|
|
863
|
-
|
|
862
|
+
class Cluster(Expression):
|
|
863
|
+
arg_types = {"expressions": True}
|
|
864
864
|
|
|
865
865
|
|
|
866
866
|
class Distribute(Order):
|
|
@@ -1271,8 +1271,8 @@ class Select(Expression, Query):
|
|
|
1271
1271
|
Set the CLUSTER BY expression.
|
|
1272
1272
|
|
|
1273
1273
|
Example:
|
|
1274
|
-
>>> Select().from_("tbl").select("x").cluster_by("x
|
|
1275
|
-
'SELECT x FROM tbl CLUSTER BY x
|
|
1274
|
+
>>> Select().from_("tbl").select("x").cluster_by("x").sql(dialect="hive")
|
|
1275
|
+
'SELECT x FROM tbl CLUSTER BY x'
|
|
1276
1276
|
|
|
1277
1277
|
Args:
|
|
1278
1278
|
*expressions: the SQL code strings to parse.
|
|
@@ -676,6 +676,7 @@ class Generator:
|
|
|
676
676
|
exp.CopyGrantsProperty: exp.Properties.Location.POST_SCHEMA,
|
|
677
677
|
exp.Cluster: exp.Properties.Location.POST_SCHEMA,
|
|
678
678
|
exp.ClusteredByProperty: exp.Properties.Location.POST_SCHEMA,
|
|
679
|
+
exp.ClusterProperty: exp.Properties.Location.POST_SCHEMA,
|
|
679
680
|
exp.DistributedByProperty: exp.Properties.Location.POST_SCHEMA,
|
|
680
681
|
exp.DuplicateKeyProperty: exp.Properties.Location.POST_SCHEMA,
|
|
681
682
|
exp.DataBlocksizeProperty: exp.Properties.Location.POST_NAME,
|
|
@@ -3042,6 +3043,13 @@ class Generator:
|
|
|
3042
3043
|
def cluster_sql(self, expression: exp.Cluster) -> str:
|
|
3043
3044
|
return self.op_expressions("CLUSTER BY", expression)
|
|
3044
3045
|
|
|
3046
|
+
def clusterproperty_sql(self, expression: exp.ClusterProperty) -> str:
|
|
3047
|
+
if expression.this:
|
|
3048
|
+
self.unsupported(f"Unsupported CLUSTER BY {self.sql(expression, 'this')}")
|
|
3049
|
+
return ""
|
|
3050
|
+
expressions = self.expressions(expression, flat=True)
|
|
3051
|
+
return f"CLUSTER BY ({expressions})"
|
|
3052
|
+
|
|
3045
3053
|
def distribute_sql(self, expression: exp.Distribute) -> str:
|
|
3046
3054
|
return self.op_expressions("DISTRIBUTE BY", expression)
|
|
3047
3055
|
|
|
@@ -688,3 +688,9 @@ class BigQueryGenerator(generator.Generator):
|
|
|
688
688
|
return f"{self.sql(expression, 'to')}{self.sql(this)}"
|
|
689
689
|
|
|
690
690
|
return super().cast_sql(expression, safe_prefix=safe_prefix)
|
|
691
|
+
|
|
692
|
+
def clusterproperty_sql(self, expression: exp.ClusterProperty) -> str:
|
|
693
|
+
if expression.this:
|
|
694
|
+
self.unsupported(f"Unsupported CLUSTER BY {self.sql(expression, 'this')}")
|
|
695
|
+
return ""
|
|
696
|
+
return self.op_expressions("CLUSTER BY", expression)
|
|
@@ -109,3 +109,7 @@ class DatabricksGenerator(SparkGenerator):
|
|
|
109
109
|
seed = gen.this
|
|
110
110
|
|
|
111
111
|
return self.func("UNIFORM", expression.this, expression.expression, seed)
|
|
112
|
+
|
|
113
|
+
def clusterproperty_sql(self, expression):
|
|
114
|
+
this = self.sql(expression, "this") or f"({self.expressions(expression, flat=True)})"
|
|
115
|
+
return f"CLUSTER BY {this}"
|
|
@@ -2181,6 +2181,14 @@ class DuckDBGenerator(generator.Generator):
|
|
|
2181
2181
|
"""
|
|
2182
2182
|
)
|
|
2183
2183
|
|
|
2184
|
+
# Snowflake AUTO detects 3 DATE formats: YYYY-MM-DD (ISO-8601), MM/DD/YYYY, DD-MON-YYYY.
|
|
2185
|
+
# DuckDB TRY_CAST handles ISO-8601 natively. For the other two formats we use CONTAINS('/')
|
|
2186
|
+
# and REGEXP_MATCHES('[A-Za-z]') as heuristics — these correctly handle single-digit months
|
|
2187
|
+
# and days (e.g. 1/5/2020, 5-JAN-2020) where a positional char check would fail.
|
|
2188
|
+
# Ref: https://docs.snowflake.com/en/sql-reference/date-time-input-output#date-formats
|
|
2189
|
+
_TRYCAST_DATE_SLASH_FMT = "%m/%d/%Y"
|
|
2190
|
+
_TRYCAST_DATE_MON_FMT = "%d-%b-%Y"
|
|
2191
|
+
|
|
2184
2192
|
def _array_bag_sql(self, condition: exp.Expr, arr1: exp.Expr, arr2: exp.Expr) -> str:
|
|
2185
2193
|
cond = exp.Paren(this=exp.replace_placeholders(condition, arr1=arr1, arr2=arr2))
|
|
2186
2194
|
return self.sql(
|
|
@@ -4329,13 +4337,13 @@ class DuckDBGenerator(generator.Generator):
|
|
|
4329
4337
|
def trycast_sql(self, expression: exp.TryCast) -> str:
|
|
4330
4338
|
to = expression.to
|
|
4331
4339
|
to_type = to.this
|
|
4340
|
+
src = expression.this
|
|
4332
4341
|
|
|
4333
4342
|
if (
|
|
4334
4343
|
expression.args.get("null_on_text_overflow")
|
|
4335
4344
|
and to_type in exp.DataType.TEXT_TYPES
|
|
4336
4345
|
and to.expressions
|
|
4337
4346
|
):
|
|
4338
|
-
src = expression.this
|
|
4339
4347
|
return self.sql(
|
|
4340
4348
|
exp.case()
|
|
4341
4349
|
.when(
|
|
@@ -4344,6 +4352,24 @@ class DuckDBGenerator(generator.Generator):
|
|
|
4344
4352
|
)
|
|
4345
4353
|
.else_(exp.Null())
|
|
4346
4354
|
)
|
|
4355
|
+
elif to_type == exp.DType.DATE and expression.args.get("probe_date_format"):
|
|
4356
|
+
slash_strptime = exp.cast(
|
|
4357
|
+
exp.func("TRY_STRPTIME", src, exp.Literal.string(self._TRYCAST_DATE_SLASH_FMT)),
|
|
4358
|
+
"DATE",
|
|
4359
|
+
)
|
|
4360
|
+
mon_strptime = exp.cast(
|
|
4361
|
+
exp.func("TRY_STRPTIME", src, exp.Literal.string(self._TRYCAST_DATE_MON_FMT)),
|
|
4362
|
+
"DATE",
|
|
4363
|
+
)
|
|
4364
|
+
return self.sql(
|
|
4365
|
+
exp.case()
|
|
4366
|
+
.when(exp.func("CONTAINS", src, exp.Literal.string("/")), slash_strptime)
|
|
4367
|
+
.when(
|
|
4368
|
+
exp.RegexpLike(this=src, expression=exp.Literal.string("[A-Za-z]")),
|
|
4369
|
+
mon_strptime,
|
|
4370
|
+
)
|
|
4371
|
+
.else_(exp.TryCast(this=src, to=to))
|
|
4372
|
+
)
|
|
4347
4373
|
|
|
4348
4374
|
return super().trycast_sql(expression)
|
|
4349
4375
|
|
|
@@ -279,14 +279,10 @@ class PrestoGenerator(generator.Generator):
|
|
|
279
279
|
exp.ArraySlice: rename_func("SLICE"),
|
|
280
280
|
exp.AtTimeZone: rename_func("AT_TIMEZONE"),
|
|
281
281
|
exp.BitwiseAnd: lambda self, e: self.func("BITWISE_AND", e.this, e.expression),
|
|
282
|
-
exp.BitwiseLeftShift:
|
|
283
|
-
"BITWISE_ARITHMETIC_SHIFT_LEFT", e.this, e.expression
|
|
284
|
-
),
|
|
282
|
+
exp.BitwiseLeftShift: rename_func("BITWISE_LEFT_SHIFT"),
|
|
285
283
|
exp.BitwiseNot: lambda self, e: self.func("BITWISE_NOT", e.this),
|
|
286
284
|
exp.BitwiseOr: lambda self, e: self.func("BITWISE_OR", e.this, e.expression),
|
|
287
|
-
exp.BitwiseRightShift:
|
|
288
|
-
"BITWISE_ARITHMETIC_SHIFT_RIGHT", e.this, e.expression
|
|
289
|
-
),
|
|
285
|
+
exp.BitwiseRightShift: rename_func("BITWISE_RIGHT_SHIFT"),
|
|
290
286
|
exp.BitwiseXor: lambda self, e: self.func("BITWISE_XOR", e.this, e.expression),
|
|
291
287
|
exp.Cast: transforms.preprocess([transforms.epoch_cast_to_ts]),
|
|
292
288
|
exp.CurrentTime: lambda *_: "CURRENT_TIME",
|
|
@@ -903,9 +903,6 @@ class SnowflakeGenerator(generator.Generator):
|
|
|
903
903
|
|
|
904
904
|
return f"AUTOINCREMENT{start}{increment}{order_clause}"
|
|
905
905
|
|
|
906
|
-
def cluster_sql(self, expression: exp.Cluster) -> str:
|
|
907
|
-
return f"CLUSTER BY ({self.expressions(expression, flat=True)})"
|
|
908
|
-
|
|
909
906
|
def struct_sql(self, expression: exp.Struct) -> str:
|
|
910
907
|
if len(expression.expressions) == 1:
|
|
911
908
|
arg = expression.expressions[0]
|
|
@@ -310,10 +310,13 @@ class StarRocksGenerator(MySQLGenerator):
|
|
|
310
310
|
|
|
311
311
|
return f"PARTITION BY {self.sql(this)}"
|
|
312
312
|
|
|
313
|
-
def
|
|
313
|
+
def clusterproperty_sql(self, expression: exp.ClusterProperty) -> str:
|
|
314
314
|
"""Generate StarRocks ORDER BY clause for clustering."""
|
|
315
|
+
if expression.this:
|
|
316
|
+
self.unsupported(f"Unsupported CLUSTER BY {self.sql(expression, 'this')}")
|
|
317
|
+
return ""
|
|
315
318
|
expressions = self.expressions(expression, flat=True)
|
|
316
|
-
return f"ORDER BY ({expressions})"
|
|
319
|
+
return f"ORDER BY ({expressions})"
|
|
317
320
|
|
|
318
321
|
def refreshtriggerproperty_sql(self, expression: exp.RefreshTriggerProperty) -> str:
|
|
319
322
|
"""Generate StarRocks REFRESH clause for materialized views.
|
|
@@ -248,7 +248,7 @@ def _rename_inner_sources(outer_scope: Scope, inner_scope: Scope, alias: str) ->
|
|
|
248
248
|
new_alias = exp.to_identifier(new_name)
|
|
249
249
|
|
|
250
250
|
if isinstance(source, exp.Table) and source.alias:
|
|
251
|
-
source.set("alias", new_alias)
|
|
251
|
+
source.set("alias", exp.TableAlias(this=new_alias))
|
|
252
252
|
elif isinstance(source, exp.Table):
|
|
253
253
|
source.replace(exp.alias_(source, new_alias))
|
|
254
254
|
elif isinstance(source.parent, exp.Subquery):
|
|
@@ -544,7 +544,7 @@ def _convert_columns_to_dots(scope: Scope, resolver: Resolver) -> None:
|
|
|
544
544
|
dot_parts = column.meta.pop("dot_parts", [])
|
|
545
545
|
if (
|
|
546
546
|
column_table
|
|
547
|
-
and column_table not in scope.
|
|
547
|
+
and column_table not in scope.selected_sources
|
|
548
548
|
and (
|
|
549
549
|
not scope.parent
|
|
550
550
|
or column_table not in scope.parent.sources
|
|
@@ -553,7 +553,7 @@ def _convert_columns_to_dots(scope: Scope, resolver: Resolver) -> None:
|
|
|
553
553
|
):
|
|
554
554
|
root, *parts = column.parts
|
|
555
555
|
|
|
556
|
-
if isinstance(root, exp.Identifier) and root.name in scope.
|
|
556
|
+
if isinstance(root, exp.Identifier) and root.name in scope.selected_sources:
|
|
557
557
|
# The struct is already qualified, but we still need to change the AST
|
|
558
558
|
column_table = root
|
|
559
559
|
root, *parts = parts
|
|
@@ -1238,7 +1238,7 @@ class Parser:
|
|
|
1238
1238
|
"CHARSET": lambda self, **kwargs: self._parse_character_set(**kwargs),
|
|
1239
1239
|
"CHARACTER SET": lambda self, **kwargs: self._parse_character_set(**kwargs),
|
|
1240
1240
|
"CHECKSUM": lambda self: self._parse_checksum(),
|
|
1241
|
-
"CLUSTER BY": lambda self: self.
|
|
1241
|
+
"CLUSTER BY": lambda self: self._parse_cluster_property(),
|
|
1242
1242
|
"CLUSTERED": lambda self: self._parse_clustered_by(),
|
|
1243
1243
|
"COLLATE": lambda self, **kwargs: self._parse_property_assignment(
|
|
1244
1244
|
exp.CollateProperty, **kwargs
|
|
@@ -1437,7 +1437,7 @@ class Parser:
|
|
|
1437
1437
|
"ADD": lambda self: self._parse_alter_table_add(),
|
|
1438
1438
|
"AS": lambda self: self._parse_select(),
|
|
1439
1439
|
"ALTER": lambda self: self._parse_alter_table_alter(),
|
|
1440
|
-
"CLUSTER BY": lambda self: self.
|
|
1440
|
+
"CLUSTER BY": lambda self: self._parse_cluster_property(),
|
|
1441
1441
|
"DELETE": lambda self: self.expression(exp.Delete(where=self._parse_where())),
|
|
1442
1442
|
"DROP": lambda self: self._parse_alter_table_drop(),
|
|
1443
1443
|
"RENAME": lambda self: self._parse_alter_table_rename(),
|
|
@@ -1537,7 +1537,7 @@ class Parser:
|
|
|
1537
1537
|
TokenType.USING: lambda self: ("sample", self._parse_table_sample(as_modifier=True)),
|
|
1538
1538
|
TokenType.CLUSTER_BY: lambda self: (
|
|
1539
1539
|
"cluster",
|
|
1540
|
-
self.
|
|
1540
|
+
self._parse_cluster(),
|
|
1541
1541
|
),
|
|
1542
1542
|
TokenType.DISTRIBUTE_BY: lambda self: (
|
|
1543
1543
|
"distribute",
|
|
@@ -3064,14 +3064,18 @@ class Parser:
|
|
|
3064
3064
|
|
|
3065
3065
|
return self.expression(exp.ChecksumProperty(on=on, default=self._match(TokenType.DEFAULT)))
|
|
3066
3066
|
|
|
3067
|
-
def _parse_cluster(self
|
|
3067
|
+
def _parse_cluster(self) -> exp.Cluster:
|
|
3068
|
+
self._match(TokenType.CLUSTER_BY)
|
|
3068
3069
|
return self.expression(
|
|
3069
3070
|
exp.Cluster(
|
|
3070
|
-
expressions=(
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3071
|
+
expressions=self._parse_csv(self._parse_column),
|
|
3072
|
+
)
|
|
3073
|
+
)
|
|
3074
|
+
|
|
3075
|
+
def _parse_cluster_property(self) -> exp.ClusterProperty:
|
|
3076
|
+
return self.expression(
|
|
3077
|
+
exp.ClusterProperty(
|
|
3078
|
+
expressions=self._parse_wrapped_csv(self._parse_column),
|
|
3075
3079
|
)
|
|
3076
3080
|
)
|
|
3077
3081
|
|
|
@@ -509,6 +509,13 @@ class BigQueryParser(parser.Parser):
|
|
|
509
509
|
|
|
510
510
|
return column
|
|
511
511
|
|
|
512
|
+
def _parse_cluster_property(self) -> exp.ClusterProperty:
|
|
513
|
+
return self.expression(
|
|
514
|
+
exp.ClusterProperty(
|
|
515
|
+
expressions=self._parse_csv(self._parse_column),
|
|
516
|
+
)
|
|
517
|
+
)
|
|
518
|
+
|
|
512
519
|
@t.overload
|
|
513
520
|
def _parse_json_object(self, agg: t.Literal[False]) -> exp.JSONObject: ...
|
|
514
521
|
|
|
@@ -53,3 +53,8 @@ class DatabricksParser(SparkParser):
|
|
|
53
53
|
if self._match(TokenType.L_PAREN):
|
|
54
54
|
self._match_r_paren()
|
|
55
55
|
return self.expression(exp.CurrentDate())
|
|
56
|
+
|
|
57
|
+
def _parse_cluster_property(self):
|
|
58
|
+
if self._match_texts(("AUTO", "NONE")):
|
|
59
|
+
return self.expression(exp.ClusterProperty(this=self._prev.text.upper()))
|
|
60
|
+
return super()._parse_cluster_property()
|
|
@@ -89,11 +89,14 @@ def _build_datetime(name: str, kind: exp.DType, safe: bool = False) -> t.Callabl
|
|
|
89
89
|
if isinstance(value, (exp.Literal, exp.Neg)) or (value and scale_or_fmt):
|
|
90
90
|
# Converts calls like `TO_TIME('01:02:03')` into casts
|
|
91
91
|
if len(args) == 1 and value.is_string and not int_value:
|
|
92
|
-
|
|
92
|
+
cast = (
|
|
93
93
|
exp.TryCast(this=value, to=kind.into_expr(), requires_string=True)
|
|
94
94
|
if safe
|
|
95
95
|
else exp.cast(value, kind)
|
|
96
96
|
)
|
|
97
|
+
if safe and kind == exp.DType.DATE:
|
|
98
|
+
cast.set("probe_date_format", True)
|
|
99
|
+
return cast
|
|
97
100
|
|
|
98
101
|
# Handles `TO_TIMESTAMP(str, fmt)` and `TO_TIMESTAMP(num, scale)` as special
|
|
99
102
|
# cases so we can transpile them, since they're relatively common
|
|
@@ -1308,13 +1311,11 @@ class SnowflakeParser(parser.Parser):
|
|
|
1308
1311
|
if not strict and to and to.this == exp.DataType.Type.BOOLEAN:
|
|
1309
1312
|
return self.expression(exp.ToBoolean(this=kwargs.get("this"), safe=True))
|
|
1310
1313
|
cast = super().build_cast(strict, **kwargs)
|
|
1311
|
-
if (
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
):
|
|
1317
|
-
cast.set("null_on_text_overflow", True)
|
|
1314
|
+
if isinstance(cast, exp.TryCast) and to:
|
|
1315
|
+
if to.this in exp.DataType.TEXT_TYPES and to.expressions:
|
|
1316
|
+
cast.set("null_on_text_overflow", True)
|
|
1317
|
+
elif to.this == exp.DType.DATE and cast.this.is_string:
|
|
1318
|
+
cast.set("probe_date_format", True)
|
|
1318
1319
|
return cast
|
|
1319
1320
|
|
|
1320
1321
|
def _parse_window(self, this: exp.Expr | None, alias: bool = False) -> exp.Expr | None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.10.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
|
|
@@ -34,10 +34,10 @@ Requires-Dist: types-pytz; extra == "dev"
|
|
|
34
34
|
Requires-Dist: typing_extensions; extra == "dev"
|
|
35
35
|
Requires-Dist: pyperf; extra == "dev"
|
|
36
36
|
Provides-Extra: c
|
|
37
|
-
Requires-Dist: sqlglotc==30.
|
|
37
|
+
Requires-Dist: sqlglotc==30.10.0; python_version >= "3.10" and extra == "c"
|
|
38
38
|
Provides-Extra: rs
|
|
39
39
|
Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
|
|
40
|
-
Requires-Dist: sqlglotc==30.
|
|
40
|
+
Requires-Dist: sqlglotc==30.10.0; python_version >= "3.10" and extra == "rs"
|
|
41
41
|
Dynamic: license-file
|
|
42
42
|
Dynamic: provides-extra
|
|
43
43
|
|
|
@@ -235,6 +235,7 @@ class TestBigQuery(Validator):
|
|
|
235
235
|
self.validate_identity("SELECT CAST(CURRENT_DATE AS STRING FORMAT 'DAY') AS current_day")
|
|
236
236
|
self.validate_identity("SAFE_CAST(encrypted_value AS STRING FORMAT 'BASE64')")
|
|
237
237
|
self.validate_identity("CAST(encrypted_value AS STRING FORMAT 'BASE64')")
|
|
238
|
+
self.validate_identity("CREATE TABLE t CLUSTER BY col1, col2")
|
|
238
239
|
self.validate_identity("DATE(2016, 12, 25)")
|
|
239
240
|
self.validate_identity("DATE(CAST('2016-12-25 23:59:59' AS DATETIME))")
|
|
240
241
|
self.validate_identity("SELECT foo IN UNNEST(bar) AS bla")
|
|
@@ -1855,6 +1855,13 @@ LIFETIME(MIN 0 MAX 0)""",
|
|
|
1855
1855
|
)
|
|
1856
1856
|
self.validate_identity("splitByChar('', x)")
|
|
1857
1857
|
|
|
1858
|
+
def test_table_functions(self):
|
|
1859
|
+
self.validate_identity(
|
|
1860
|
+
"CREATE VIEW myschema.myview (c1 String NOT NULL) AS SELECT c1 FROM file('base/dir/*.parquet', Parquet)"
|
|
1861
|
+
)
|
|
1862
|
+
self.validate_identity("SELECT * FROM file('path', Parquet) WHERE x > 1")
|
|
1863
|
+
self.validate_identity("SELECT * FROM file('path', Parquet)")
|
|
1864
|
+
|
|
1858
1865
|
def test_sql_security(self):
|
|
1859
1866
|
stmts = [
|
|
1860
1867
|
"CREATE VIEW v DEFINER='alice' SQL SECURITY DEFINER AS SELECT 1",
|
|
@@ -35,6 +35,12 @@ class TestDatabricks(Validator):
|
|
|
35
35
|
self.validate_identity("CREATE TABLE t (c STRUCT<interval: DOUBLE COMMENT 'aaa'>)")
|
|
36
36
|
self.validate_identity("CREATE TABLE my_table TBLPROPERTIES (a.b=15)")
|
|
37
37
|
self.validate_identity("CREATE TABLE my_table TBLPROPERTIES ('a.b'=15)")
|
|
38
|
+
self.validate_identity("CREATE TABLE table1 CLUSTER BY AUTO")
|
|
39
|
+
self.validate_identity("ALTER TABLE t CLUSTER BY NONE")
|
|
40
|
+
self.validate_identity("CREATE TABLE t CLUSTER BY (col1)")
|
|
41
|
+
self.validate_identity("CREATE TABLE t CLUSTER BY (col1, col2)")
|
|
42
|
+
self.validate_identity("SELECT col1 FROM t CLUSTER BY col1")
|
|
43
|
+
self.validate_identity("SELECT col1, col2 FROM t CLUSTER BY col1, col2")
|
|
38
44
|
self.validate_identity("SELECT CAST('11 23:4:0' AS INTERVAL DAY TO HOUR)")
|
|
39
45
|
self.validate_identity("SELECT CAST('11 23:4:0' AS INTERVAL DAY TO MINUTE)")
|
|
40
46
|
self.validate_identity("SELECT CAST('11 23:4:0' AS INTERVAL DAY TO SECOND)")
|
|
@@ -227,7 +227,7 @@ class TestExasol(Validator):
|
|
|
227
227
|
write={
|
|
228
228
|
"exasol": "SELECT BIT_LSHIFT(x, 1)",
|
|
229
229
|
"duckdb": "SELECT x << 1",
|
|
230
|
-
"presto": "SELECT
|
|
230
|
+
"presto": "SELECT BITWISE_LEFT_SHIFT(x, 1)",
|
|
231
231
|
"hive": "SELECT x << 1",
|
|
232
232
|
"spark": "SELECT SHIFTLEFT(x, 1)",
|
|
233
233
|
},
|
|
@@ -243,7 +243,7 @@ class TestExasol(Validator):
|
|
|
243
243
|
write={
|
|
244
244
|
"exasol": "SELECT BIT_RSHIFT(x, 1)",
|
|
245
245
|
"duckdb": "SELECT x >> 1",
|
|
246
|
-
"presto": "SELECT
|
|
246
|
+
"presto": "SELECT BITWISE_RIGHT_SHIFT(x, 1)",
|
|
247
247
|
"hive": "SELECT x >> 1",
|
|
248
248
|
"spark": "SELECT SHIFTRIGHT(x, 1)",
|
|
249
249
|
},
|