sqlglot 30.9.0__tar.gz → 30.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlglot-30.9.0 → sqlglot-30.11.0}/CHANGELOG.md +142 -0
- {sqlglot-30.9.0/sqlglot.egg-info → sqlglot-30.11.0}/PKG-INFO +3 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/bigquery.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/builders.py +6 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/core.py +8 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/functions.py +6 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/properties.py +4 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/query.py +4 -4
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generator.py +10 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/bigquery.py +9 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/databricks.py +14 -12
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/duckdb.py +27 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/presto.py +2 -6
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/snowflake.py +0 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/starrocks.py +5 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/tsql.py +9 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/lineage.py +124 -20
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/annotate_types.py +4 -4
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/merge_subqueries.py +1 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/normalize_identifiers.py +4 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/qualify_columns.py +25 -13
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/resolver.py +6 -4
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/scope.py +32 -8
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/simplify.py +19 -12
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parser.py +13 -9
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/bigquery.py +11 -4
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/clickhouse.py +1 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/databricks.py +5 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/snowflake.py +9 -8
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/bigquery.py +1 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0/sqlglot.egg-info}/PKG-INFO +3 -3
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglotc/pyproject.toml +1 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglotc/setup.py +33 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_bigquery.py +1 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_clickhouse.py +7 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_databricks.py +15 -7
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_exasol.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_hive.py +4 -4
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_redshift.py +1 -1
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_snowflake.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_starrocks.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_tsql.py +3 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/qualify_columns.sql +12 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_build.py +2 -2
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_lineage.py +116 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_optimizer.py +35 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/.gitignore +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/.gitmodules +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/.gitpod.yml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/AGENTS.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/CLAUDE.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/LICENSE +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/MANIFEST.in +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/Makefile +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/README.md +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/pyproject.toml +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/setup.cfg +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/setup.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/dialect.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/array.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/string.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/expressions/temporal.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/generators/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/exasol.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/time.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/tokenizer_core.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/tokens.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/transforms.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/hive.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/snowflake.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot.egg-info/SOURCES.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglot.png +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_dialect.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_duckdb.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_mysql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_oracle.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_postgres.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_spark.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_sqlite.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/annotate_functions.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/helpers.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_diff.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_docs.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_errors.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_executor.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_generator.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_helper.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_parser.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_schema.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_serde.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_time.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.9.0 → sqlglot-30.11.0}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,146 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.10.0] - 2026-06-09
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`287df74`](https://github.com/tobymao/sqlglot/commit/287df744e968e0b3cd70679abf443ce8db685313) - parsing and generation of `CLUSTER BY` *(PR [#7716](https://github.com/tobymao/sqlglot/pull/7716) by [@JoshuaM176](https://github.com/JoshuaM176))*:
|
|
7
|
+
|
|
8
|
+
parsing and generation of `CLUSTER BY` (#7716)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### :sparkles: New Features
|
|
12
|
+
- [`6ae53c2`](https://github.com/tobymao/sqlglot/commit/6ae53c2e8442c6ebe72741c75c41475374684551) - **duckdb**: Add transpilation support for TRY_CAST date-format *(PR [#7707](https://github.com/tobymao/sqlglot/pull/7707) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
13
|
+
|
|
14
|
+
### :bug: Bug Fixes
|
|
15
|
+
- [`8be7236`](https://github.com/tobymao/sqlglot/commit/8be7236391931bb2643dabf6c0efb434b0b89995) - **clickhouse**: parse file() as a table function instead of a table alias *(PR [#7717](https://github.com/tobymao/sqlglot/pull/7717) by [@tobymao](https://github.com/tobymao))*
|
|
16
|
+
- :arrow_lower_right: *fixes issue [#7715](https://github.com/tobymao/sqlglot/issues/7715) opened by [@varoonp123](https://github.com/varoonp123)*
|
|
17
|
+
- [`6c7c9e8`](https://github.com/tobymao/sqlglot/commit/6c7c9e87dc7c7dc4c32fb7e7763227c6c65e440e) - **optimizer**: column-to-dot conversion bug in qualify due to looking at wrong source set *(PR [#7718](https://github.com/tobymao/sqlglot/pull/7718) by [@georgesittas](https://github.com/georgesittas))*
|
|
18
|
+
- [`a76439c`](https://github.com/tobymao/sqlglot/commit/a76439c1f5d66a93bb1d73ec578623bc56264310) - **presto**: Use valid bitwise shift left and right functions *(PR [#7719](https://github.com/tobymao/sqlglot/pull/7719) by [@gertjanal](https://github.com/gertjanal))*
|
|
19
|
+
- [`287df74`](https://github.com/tobymao/sqlglot/commit/287df744e968e0b3cd70679abf443ce8db685313) - parsing and generation of `CLUSTER BY` *(PR [#7716](https://github.com/tobymao/sqlglot/pull/7716) by [@JoshuaM176](https://github.com/JoshuaM176))*
|
|
20
|
+
- [`982bd16`](https://github.com/tobymao/sqlglot/commit/982bd166dff9f513ce070742673a1367a0527738) - **optimizer**: `merge_subqueries` bug where `Identifier` was set as a table alias *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
21
|
+
|
|
22
|
+
### :wrench: Chores
|
|
23
|
+
- [`1253922`](https://github.com/tobymao/sqlglot/commit/125392226cc403f3b0dbba86187512564a42770a) - refactor clusterproperty_sql funcs *(commit by [@geooo109](https://github.com/geooo109))*
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [v30.9.0] - 2026-06-04
|
|
27
|
+
### :boom: BREAKING CHANGES
|
|
28
|
+
- 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))*:
|
|
29
|
+
|
|
30
|
+
delimited global/temp table references closes #7657
|
|
31
|
+
|
|
32
|
+
- 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))*:
|
|
33
|
+
|
|
34
|
+
improve datatype typing (#7654)
|
|
35
|
+
|
|
36
|
+
- due to [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
37
|
+
|
|
38
|
+
rename `Distance3d` to `DistanceNd`
|
|
39
|
+
|
|
40
|
+
- 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))*:
|
|
41
|
+
|
|
42
|
+
qualify column reference in NULLS LAST CASE simulation (#7641)
|
|
43
|
+
|
|
44
|
+
- 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))*:
|
|
45
|
+
|
|
46
|
+
propagate type through Lag/Lead/NthValue window functions [CLAUDE] (#7652)
|
|
47
|
+
|
|
48
|
+
- 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))*:
|
|
49
|
+
|
|
50
|
+
annotate ranking window functions with constant return types [CLAUDE] (#7658)
|
|
51
|
+
|
|
52
|
+
- 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))*:
|
|
53
|
+
|
|
54
|
+
skip unnesting NOT IN to preserve NULL semantics (#7671)
|
|
55
|
+
|
|
56
|
+
- 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))*:
|
|
57
|
+
|
|
58
|
+
support INSERT IGNORE and offset-only limits [CODEX] (#7674)
|
|
59
|
+
|
|
60
|
+
- 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))*:
|
|
61
|
+
|
|
62
|
+
CONCAT/PAD type leaks non-string arg when string args aren't TEXT [CLAUDE] (#7661)
|
|
63
|
+
|
|
64
|
+
- 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))*:
|
|
65
|
+
|
|
66
|
+
fix for Snowflake transpilation issue related to PIVOT and string literal column names (#7660)
|
|
67
|
+
|
|
68
|
+
- 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))*:
|
|
69
|
+
|
|
70
|
+
parse xor(a,b,c) as xor(a,xor(b,c)), fix value unpacking bug in `normalize` (#7702)
|
|
71
|
+
|
|
72
|
+
- due to [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
73
|
+
|
|
74
|
+
bump sqlglot-mypy
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### :sparkles: New Features
|
|
78
|
+
- [`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))*
|
|
79
|
+
- [`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))*
|
|
80
|
+
- [`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))*
|
|
81
|
+
- [`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))*
|
|
82
|
+
- [`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))*
|
|
83
|
+
- [`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))*
|
|
84
|
+
- [`33b31be`](https://github.com/tobymao/sqlglot/commit/33b31be8255d45a464cd119fe4d16c3438ff3be3) - **snowflake**: support `OBJECT_AGG(DISTINCT ...)` *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
85
|
+
- [`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))*
|
|
86
|
+
- [`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))*
|
|
87
|
+
- [`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))*
|
|
88
|
+
- [`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))*
|
|
89
|
+
- [`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))*
|
|
90
|
+
- [`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))*
|
|
91
|
+
- :arrow_lower_right: *addresses issue [#7688](https://github.com/tobymao/sqlglot/issues/7688) opened by [@VBobCat](https://github.com/VBobCat)*
|
|
92
|
+
- [`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))*
|
|
93
|
+
- [`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))*
|
|
94
|
+
|
|
95
|
+
### :bug: Bug Fixes
|
|
96
|
+
- [`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))*
|
|
97
|
+
- [`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))*
|
|
98
|
+
- [`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))*
|
|
99
|
+
- [`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))*
|
|
100
|
+
- [`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))*
|
|
101
|
+
- [`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))*
|
|
102
|
+
- :arrow_lower_right: *fixes issue [#7666](https://github.com/tobymao/sqlglot/issues/7666) opened by [@wzhseno](https://github.com/wzhseno)*
|
|
103
|
+
- [`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))*
|
|
104
|
+
- [`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))*
|
|
105
|
+
- :arrow_lower_right: *fixes issue [#7676](https://github.com/tobymao/sqlglot/issues/7676) opened by [@russellromney](https://github.com/russellromney)*
|
|
106
|
+
- [`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))*
|
|
107
|
+
- [`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))*
|
|
108
|
+
- :arrow_lower_right: *fixes issue [#7679](https://github.com/tobymao/sqlglot/issues/7679) opened by [@devfros](https://github.com/devfros)*
|
|
109
|
+
- [`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))*
|
|
110
|
+
- [`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))*
|
|
111
|
+
- [`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))*
|
|
112
|
+
- :arrow_lower_right: *fixes issue [#7683](https://github.com/tobymao/sqlglot/issues/7683) opened by [@devfros](https://github.com/devfros)*
|
|
113
|
+
- [`08e61b7`](https://github.com/tobymao/sqlglot/commit/08e61b775bd678124bb5e154e950b55e92e64182) - **expressions**: invalidate cached _hash on append() *(commit by [@tobymao](https://github.com/tobymao))*
|
|
114
|
+
- [`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))*
|
|
115
|
+
- [`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))*
|
|
116
|
+
- [`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))*
|
|
117
|
+
- [`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))*
|
|
118
|
+
- [`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))*
|
|
119
|
+
- [`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))*
|
|
120
|
+
- [`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))*
|
|
121
|
+
- :arrow_lower_right: *fixes issue [#7698](https://github.com/tobymao/sqlglot/issues/7698) opened by [@gabrielteotonio](https://github.com/gabrielteotonio)*
|
|
122
|
+
- [`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))*
|
|
123
|
+
- [`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))*
|
|
124
|
+
- [`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))*
|
|
125
|
+
|
|
126
|
+
### :zap: Performance Improvements
|
|
127
|
+
- [`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))*
|
|
128
|
+
- [`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))*
|
|
129
|
+
- [`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))*
|
|
130
|
+
|
|
131
|
+
### :recycle: Refactors
|
|
132
|
+
- [`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))*
|
|
133
|
+
- [`f00bb4a`](https://github.com/tobymao/sqlglot/commit/f00bb4a245606935253c2ba6b040af27e0f45106) - **postgres**: rename `Distance3d` to `DistanceNd` *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
134
|
+
|
|
135
|
+
### :wrench: Chores
|
|
136
|
+
- [`0399cca`](https://github.com/tobymao/sqlglot/commit/0399cca9a1ec5f248cbe5837ce18da8401de3622) - bump sqlglot-mypy, fix leakcheck *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
137
|
+
- [`1b78667`](https://github.com/tobymao/sqlglot/commit/1b78667da199e6f510ff901a990b23ad728194f5) - bump sqlglot-mypy to post9 *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
138
|
+
- [`b02ed52`](https://github.com/tobymao/sqlglot/commit/b02ed523f3242545e860f1265efc177a734cfd6f) - small clean up for within group *(commit by [@geooo109](https://github.com/geooo109))*
|
|
139
|
+
- [`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))*
|
|
140
|
+
- [`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))*
|
|
141
|
+
- [`2f6434e`](https://github.com/tobymao/sqlglot/commit/2f6434e2bb26bc0da43913a6e66af0b89bc7b8da) - bump sqlglot-mypy *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
142
|
+
|
|
143
|
+
|
|
4
144
|
## [v30.8.0] - 2026-05-13
|
|
5
145
|
### :boom: BREAKING CHANGES
|
|
6
146
|
- 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 +14607,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
14467
14607
|
[v30.6.0]: https://github.com/tobymao/sqlglot/compare/v30.5.0...v30.6.0
|
|
14468
14608
|
[v30.7.0]: https://github.com/tobymao/sqlglot/compare/v30.6.0...v30.7.0
|
|
14469
14609
|
[v30.8.0]: https://github.com/tobymao/sqlglot/compare/v30.7.0...v30.8.0
|
|
14610
|
+
[v30.9.0]: https://github.com/tobymao/sqlglot/compare/v30.8.0...v30.9.0
|
|
14611
|
+
[v30.10.0]: https://github.com/tobymao/sqlglot/compare/v30.9.0...v30.10.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.11.0
|
|
4
4
|
Summary: An easily customizable SQL parser and transpiler
|
|
5
5
|
Author-email: Toby Mao <toby.mao@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -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.11.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.11.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.11.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 11, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g333e3c7fa'
|
|
@@ -147,9 +147,9 @@ class BigQuery(Dialect):
|
|
|
147
147
|
or (
|
|
148
148
|
isinstance(parent, exp.Table)
|
|
149
149
|
and parent.db
|
|
150
|
-
and (parent.
|
|
150
|
+
and (parent.meta_get("quoted_table") or not parent.meta_get("maybe_column"))
|
|
151
151
|
)
|
|
152
|
-
or expression.
|
|
152
|
+
or expression.meta_get("is_table")
|
|
153
153
|
)
|
|
154
154
|
if not case_sensitive:
|
|
155
155
|
expression.set("this", expression.this.lower())
|
|
@@ -319,6 +319,11 @@ def parse_identifier(name: str | Identifier, dialect: DialectType = None) -> Ide
|
|
|
319
319
|
Returns:
|
|
320
320
|
The identifier ast node.
|
|
321
321
|
"""
|
|
322
|
+
if isinstance(name, str) and SAFE_IDENTIFIER_RE.match(name):
|
|
323
|
+
# Simple names parse to a single unquoted identifier in all dialects, so we can
|
|
324
|
+
# avoid the tokenizer/parser round-trip for them.
|
|
325
|
+
return Identifier(this=name, quoted=False)
|
|
326
|
+
|
|
322
327
|
try:
|
|
323
328
|
expression = maybe_parse(name, dialect=dialect, into=Identifier)
|
|
324
329
|
except (ParseError, TokenError):
|
|
@@ -822,7 +827,7 @@ def replace_tables(
|
|
|
822
827
|
mapping = {normalize_table_name(k, dialect=dialect): v for k, v in mapping.items()}
|
|
823
828
|
|
|
824
829
|
def _replace_tables(node: Expr) -> Expr:
|
|
825
|
-
if isinstance(node, Table) and node.
|
|
830
|
+
if isinstance(node, Table) and node.meta_get("replace") is not False:
|
|
826
831
|
original = normalize_table_name(node, dialect=dialect)
|
|
827
832
|
new_name = mapping.get(original)
|
|
828
833
|
|
|
@@ -240,6 +240,9 @@ class Expr:
|
|
|
240
240
|
def meta(self) -> dict[str, t.Any]:
|
|
241
241
|
raise NotImplementedError
|
|
242
242
|
|
|
243
|
+
def meta_get(self, key: str, default: t.Any = None) -> t.Any:
|
|
244
|
+
raise NotImplementedError
|
|
245
|
+
|
|
243
246
|
def __deepcopy__(self, memo: t.Any) -> Expr:
|
|
244
247
|
raise NotImplementedError
|
|
245
248
|
|
|
@@ -990,6 +993,11 @@ class Expression(Expr):
|
|
|
990
993
|
self._meta = {}
|
|
991
994
|
return self._meta
|
|
992
995
|
|
|
996
|
+
def meta_get(self, key: str, default: t.Any = None) -> t.Any:
|
|
997
|
+
"""Reads a meta value without allocating the meta dict (unlike the `meta` property)."""
|
|
998
|
+
meta = self._meta
|
|
999
|
+
return meta.get(key, default) if meta is not None else default
|
|
1000
|
+
|
|
993
1001
|
def __deepcopy__(self, memo: t.Any) -> Expr:
|
|
994
1002
|
root = self.__class__()
|
|
995
1003
|
stack: list[tuple[Expr, Expr]] = [(self, root)]
|
|
@@ -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
|
|
|
@@ -4546,7 +4554,7 @@ class Generator:
|
|
|
4546
4554
|
args.append(arg_value)
|
|
4547
4555
|
|
|
4548
4556
|
if self.dialect.PRESERVE_ORIGINAL_NAMES:
|
|
4549
|
-
name =
|
|
4557
|
+
name = expression.meta_get("name") or expression.sql_name()
|
|
4550
4558
|
else:
|
|
4551
4559
|
name = expression.sql_name()
|
|
4552
4560
|
|
|
@@ -5250,7 +5258,7 @@ class Generator:
|
|
|
5250
5258
|
)
|
|
5251
5259
|
return self.sql(this)
|
|
5252
5260
|
|
|
5253
|
-
if self.IGNORE_NULLS_IN_FUNC and not expression.
|
|
5261
|
+
if self.IGNORE_NULLS_IN_FUNC and not expression.meta_get("inline"):
|
|
5254
5262
|
if self.IGNORE_NULLS_BEFORE_ORDER:
|
|
5255
5263
|
# The first modifier here will be the one closest to the AggFunc's arg
|
|
5256
5264
|
mods = sorted(
|
|
@@ -201,7 +201,7 @@ def _levenshtein_sql(self: BigQueryGenerator, expression: exp.Levenshtein) -> st
|
|
|
201
201
|
|
|
202
202
|
|
|
203
203
|
def _json_extract_sql(self: BigQueryGenerator, expression: JSON_EXTRACT_TYPE) -> str:
|
|
204
|
-
name =
|
|
204
|
+
name = expression.meta_get("name") or expression.sql_name()
|
|
205
205
|
upper = name.upper()
|
|
206
206
|
|
|
207
207
|
dquote_escaping = upper in DQUOTES_ESCAPING_JSON_FUNCTIONS
|
|
@@ -565,7 +565,7 @@ class BigQueryGenerator(generator.Generator):
|
|
|
565
565
|
)
|
|
566
566
|
|
|
567
567
|
def column_parts(self, expression: exp.Column) -> str:
|
|
568
|
-
if expression.
|
|
568
|
+
if expression.meta_get("quoted_column"):
|
|
569
569
|
# If a column reference is of the form `dataset.table`.name, we need
|
|
570
570
|
# to preserve the quoted table path, otherwise the reference breaks
|
|
571
571
|
table_parts = ".".join(p.name for p in expression.parts[:-1])
|
|
@@ -583,7 +583,7 @@ class BigQueryGenerator(generator.Generator):
|
|
|
583
583
|
#
|
|
584
584
|
# - WITH x AS (SELECT [1, 2] AS y) SELECT * FROM x, `x.y` -> cross join
|
|
585
585
|
# - WITH x AS (SELECT [1, 2] AS y) SELECT * FROM x, `x`.`y` -> implicit unnest
|
|
586
|
-
if expression.
|
|
586
|
+
if expression.meta_get("quoted_table"):
|
|
587
587
|
table_parts = ".".join(p.name for p in expression.parts)
|
|
588
588
|
return self.sql(exp.Identifier(this=table_parts, quoted=True))
|
|
589
589
|
|
|
@@ -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)
|
|
@@ -10,14 +10,6 @@ from sqlglot.dialects.dialect import (
|
|
|
10
10
|
from sqlglot.generators.spark import SparkGenerator
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def _jsonextract_sql(
|
|
14
|
-
self: DatabricksGenerator, expression: exp.JSONExtract | exp.JSONExtractScalar
|
|
15
|
-
) -> str:
|
|
16
|
-
this = self.sql(expression, "this")
|
|
17
|
-
expr = self.sql(expression, "expression")
|
|
18
|
-
return f"{this}:{expr}"
|
|
19
|
-
|
|
20
|
-
|
|
21
13
|
class DatabricksGenerator(SparkGenerator):
|
|
22
14
|
TABLESAMPLE_SEED_KEYWORD = "REPEATABLE"
|
|
23
15
|
COPY_PARAMS_ARE_WRAPPED = False
|
|
@@ -52,9 +44,10 @@ class DatabricksGenerator(SparkGenerator):
|
|
|
52
44
|
transforms.any_to_exists,
|
|
53
45
|
]
|
|
54
46
|
),
|
|
55
|
-
exp.JSONExtract:
|
|
56
|
-
exp.
|
|
57
|
-
|
|
47
|
+
exp.JSONExtract: lambda self, e: f"{self.sql(e, 'this')}:{self.sql(e, 'expression')}",
|
|
48
|
+
exp.JSONPathRoot: lambda self, e: (
|
|
49
|
+
"$" if isinstance(e.parent and e.parent.parent, exp.JSONExtractScalar) else ""
|
|
50
|
+
),
|
|
58
51
|
exp.ToChar: lambda self, e: (
|
|
59
52
|
self.cast_sql(exp.Cast(this=e.this, to=exp.DataType(this="STRING")))
|
|
60
53
|
if e.args.get("is_numeric")
|
|
@@ -98,7 +91,12 @@ class DatabricksGenerator(SparkGenerator):
|
|
|
98
91
|
|
|
99
92
|
def jsonpath_sql(self, expression: exp.JSONPath) -> str:
|
|
100
93
|
expression.set("escape", None)
|
|
101
|
-
|
|
94
|
+
path = super().jsonpath_sql(expression)
|
|
95
|
+
|
|
96
|
+
if isinstance(expression.parent, exp.JSONExtractScalar):
|
|
97
|
+
return f"{self.dialect.QUOTE_START}{path}{self.dialect.QUOTE_END}"
|
|
98
|
+
|
|
99
|
+
return path
|
|
102
100
|
|
|
103
101
|
def uniform_sql(self, expression: exp.Uniform) -> str:
|
|
104
102
|
gen = expression.args.get("gen")
|
|
@@ -109,3 +107,7 @@ class DatabricksGenerator(SparkGenerator):
|
|
|
109
107
|
seed = gen.this
|
|
110
108
|
|
|
111
109
|
return self.func("UNIFORM", expression.this, expression.expression, seed)
|
|
110
|
+
|
|
111
|
+
def clusterproperty_sql(self, expression):
|
|
112
|
+
this = self.sql(expression, "this") or f"({self.expressions(expression, flat=True)})"
|
|
113
|
+
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.
|
|
@@ -417,6 +417,15 @@ class TSQLGenerator(generator.Generator):
|
|
|
417
417
|
# but CREATE VIEW actually requires the WITH clause to come after it so we need
|
|
418
418
|
# to amend the AST by moving the CTEs to the CREATE VIEW statement's query.
|
|
419
419
|
ctas_expression.set("with_", with_.pop())
|
|
420
|
+
elif (
|
|
421
|
+
kind == "FUNCTION"
|
|
422
|
+
and isinstance(ctas_expression, exp.Return)
|
|
423
|
+
and isinstance(body := ctas_expression.this.unnest(), exp.Query)
|
|
424
|
+
and (with_ := expression.args.get("with_"))
|
|
425
|
+
):
|
|
426
|
+
# Similar to the VIEW branch, the table-valued functions require the WITH clause
|
|
427
|
+
# to stay inside the RETURN body, so we move back any CTEs that were bubbled up.
|
|
428
|
+
body.set("with_", with_.pop())
|
|
420
429
|
|
|
421
430
|
table = expression.find(exp.Table)
|
|
422
431
|
|