sqlglot 30.19.0__tar.gz → 30.20.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.19.0 → sqlglot-30.20.0}/CHANGELOG.md +205 -0
- {sqlglot-30.19.0/sqlglot.egg-info → sqlglot-30.20.0}/PKG-INFO +3 -3
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/starrocks.py +1 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/json.py +1 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generator.py +7 -2
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/bigquery.py +5 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/duckdb.py +7 -5
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/mysql.py +2 -2
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/sqlite.py +13 -6
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/starrocks.py +19 -0
- sqlglot-30.20.0/sqlglot/optimizer/helpers.py +49 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/merge_subqueries.py +88 -12
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/pushdown_projections.py +7 -3
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/qualify_columns.py +4 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/simplify.py +4 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/unnest_subqueries.py +5 -24
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parser.py +22 -7
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/clickhouse.py +9 -6
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/teradata.py +2 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/duckdb.py +33 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0/sqlglot.egg-info}/PKG-INFO +3 -3
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.egg-info/SOURCES.txt +1 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.egg-info/scm_file_list.json +1 -0
- sqlglot-30.20.0/sqlglot.egg-info/scm_version.json +8 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_bigquery.py +30 -6
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_clickhouse.py +22 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_dialect.py +20 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_duckdb.py +41 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_mysql.py +3 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_postgres.py +4 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_presto.py +3 -2
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_snowflake.py +17 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_sqlite.py +54 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_starrocks.py +30 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_trino.py +18 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_tsql.py +1 -1
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/annotate_functions.sql +24 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/annotate_types.sql +28 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/merge_subqueries.sql +4 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/pushdown_projections.sql +13 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/qualify_columns.sql +3 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/simplify.sql +106 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_optimizer.py +48 -25
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_parser.py +15 -0
- sqlglot-30.19.0/sqlglot.egg-info/scm_version.json +0 -8
- {sqlglot-30.19.0 → sqlglot-30.20.0}/.gitignore +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/.gitmodules +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/.gitpod.yml +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/AGENTS.md +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/CLAUDE.md +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/LICENSE +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/MANIFEST.in +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/Makefile +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/README.md +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/pyproject.toml +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/setup.cfg +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/setup.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/anonymize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/dax.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/dialect.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/array.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/core.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/functions.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/query.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/string.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/expressions/temporal.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/clickhouse.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/databricks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/dax.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/exasol.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/hive.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/postgres.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/presto.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/redshift.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/snowflake.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/spark.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/spark2.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/trino.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/generators/tsql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/journal.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/optimizer/scope.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/bigquery.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/databricks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/dax.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/duckdb.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/exasol.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/hive.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/oracle.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/postgres.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/presto.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/redshift.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/snowflake.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/spark2.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/time.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/tokenizer_core.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/tokens.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/transforms.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/bigquery.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/databricks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/hive.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/postgres.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/snowflake.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglot.png +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/sqlglotc/setup.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_databricks.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_dax.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_oracle.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_redshift.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_spark.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/helpers.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_anonymize.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_build.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_diff.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_docs.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_errors.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_executor.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_generator.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_helper.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_lineage.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_schema.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_serde.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_time.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_transpile.py +0 -0
- {sqlglot-30.19.0 → sqlglot-30.20.0}/tests/test_typing.py +0 -0
|
@@ -1,6 +1,210 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.19.0] - 2026-09-22
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`bbb717e`](https://github.com/tobymao/sqlglot/commit/bbb717ebb24c8dcbee94d77c9154e74da1dc6c10) - rename union scope type to set operation for consistency *(PR [#8306](https://github.com/tobymao/sqlglot/pull/8306) by [@georgesittas](https://github.com/georgesittas))*:
|
|
7
|
+
|
|
8
|
+
rename union scope type to set operation for consistency (#8306)
|
|
9
|
+
|
|
10
|
+
- due to [`d7dd2cd`](https://github.com/tobymao/sqlglot/commit/d7dd2cd18fd214892136b4d0706cd65d348da285) - annotate function replace for postgres *(PR [#8307](https://github.com/tobymao/sqlglot/pull/8307) by [@PiyaDaswadkar](https://github.com/PiyaDaswadkar))*:
|
|
11
|
+
|
|
12
|
+
annotate function replace for postgres (#8307)
|
|
13
|
+
|
|
14
|
+
- due to [`9794193`](https://github.com/tobymao/sqlglot/commit/97941935711779438b34e11edbed6a736d2ad0c6) - preserve the order of CUBE, ROLLUP and GROUPING SETS in GROUP BY *(PR [#8312](https://github.com/tobymao/sqlglot/pull/8312) by [@georgesittas](https://github.com/georgesittas))*:
|
|
15
|
+
|
|
16
|
+
preserve the order of CUBE, ROLLUP and GROUPING SETS in GROUP BY (#8312)
|
|
17
|
+
|
|
18
|
+
- due to [`8bf484c`](https://github.com/tobymao/sqlglot/commit/8bf484ce23ad684430675d60fcd82c05a957e4db) - Fix the json path with single quote issue *(PR [#8309](https://github.com/tobymao/sqlglot/pull/8309) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
19
|
+
|
|
20
|
+
Fix the json path with single quote issue (#8309)
|
|
21
|
+
|
|
22
|
+
- due to [`1d753d7`](https://github.com/tobymao/sqlglot/commit/1d753d72c6e81e39cfc7160af33673314d4d600e) - EXISTS over a scalar aggregate is always true [CLAUDE] *(PR [#8304](https://github.com/tobymao/sqlglot/pull/8304) by [@jbylund](https://github.com/jbylund))*:
|
|
23
|
+
|
|
24
|
+
EXISTS over a scalar aggregate is always true [CLAUDE] (#8304)
|
|
25
|
+
|
|
26
|
+
- due to [`106ad25`](https://github.com/tobymao/sqlglot/commit/106ad25d3500f479144a24f3130c8a45a1d547b0) - decorrelation when non-EQ keys are present *(PR [#8317](https://github.com/tobymao/sqlglot/pull/8317) by [@georgesittas](https://github.com/georgesittas))*:
|
|
27
|
+
|
|
28
|
+
decorrelation when non-EQ keys are present (#8317)
|
|
29
|
+
|
|
30
|
+
- due to [`0d88a21`](https://github.com/tobymao/sqlglot/commit/0d88a211de50fa118e7e7185665d2f31310fceaa) - don't fan out EXISTS decorrelation over grouped subqueries *(PR [#8318](https://github.com/tobymao/sqlglot/pull/8318) by [@georgesittas](https://github.com/georgesittas))*:
|
|
31
|
+
|
|
32
|
+
don't fan out EXISTS decorrelation over grouped subqueries (#8318)
|
|
33
|
+
|
|
34
|
+
- due to [`0714112`](https://github.com/tobymao/sqlglot/commit/0714112aa814778ff371cc33a9441548ae6b924c) - only propagate constants through non-nullable columns *(PR [#8326](https://github.com/tobymao/sqlglot/pull/8326) by [@geooo109](https://github.com/geooo109))*:
|
|
35
|
+
|
|
36
|
+
only propagate constants through non-nullable columns (#8326)
|
|
37
|
+
|
|
38
|
+
- due to [`a34fc27`](https://github.com/tobymao/sqlglot/commit/a34fc276539980ee1f3d51e85a17a19f40b3f276) - star referencing outer-scope from correlated subquery *(PR [#8291](https://github.com/tobymao/sqlglot/pull/8291) by [@treysp](https://github.com/treysp))*:
|
|
39
|
+
|
|
40
|
+
star referencing outer-scope from correlated subquery (#8291)
|
|
41
|
+
|
|
42
|
+
- due to [`9f604b3`](https://github.com/tobymao/sqlglot/commit/9f604b3de5967c0107404676690c82e3c3552593) - preserve GREATEST/LEAST NULL semantics *(PR [#8320](https://github.com/tobymao/sqlglot/pull/8320) by [@Kunal8954](https://github.com/Kunal8954))*:
|
|
43
|
+
|
|
44
|
+
preserve GREATEST/LEAST NULL semantics (#8320)
|
|
45
|
+
|
|
46
|
+
- due to [`83abff6`](https://github.com/tobymao/sqlglot/commit/83abff6576cbc3b5858581b8ae9a912dec0f3304) - render a DynamicIdentifier in Table.name [CLAUDE] *(PR [#8329](https://github.com/tobymao/sqlglot/pull/8329) by [@chaitanyaatlan](https://github.com/chaitanyaatlan))*:
|
|
47
|
+
|
|
48
|
+
render a DynamicIdentifier in Table.name [CLAUDE] (#8329)
|
|
49
|
+
|
|
50
|
+
- due to [`9ec72cf`](https://github.com/tobymao/sqlglot/commit/9ec72cf88314ef218face2c587957189ab10a21b) - parse MySQL index prefixes *(PR [#8335](https://github.com/tobymao/sqlglot/pull/8335) by [@burnison](https://github.com/burnison))*:
|
|
51
|
+
|
|
52
|
+
parse MySQL index prefixes (#8335)
|
|
53
|
+
|
|
54
|
+
- due to [`64d6f59`](https://github.com/tobymao/sqlglot/commit/64d6f59a4981d35f362fecc615a4e3ce764bebb7) - for simplify fold contradictory comparisons to FALSE only for non-null columns *(PR [#8338](https://github.com/tobymao/sqlglot/pull/8338) by [@geooo109](https://github.com/geooo109))*:
|
|
55
|
+
|
|
56
|
+
for simplify fold contradictory comparisons to FALSE only for non-null columns (#8338)
|
|
57
|
+
|
|
58
|
+
- due to [`56a66cd`](https://github.com/tobymao/sqlglot/commit/56a66cddf65e83080ae6534824136575bf192274) - avoid to rewrite RIGHT JOIN ... ON TRUE to CROSS JOIN in simplify *(PR [#8340](https://github.com/tobymao/sqlglot/pull/8340) by [@geooo109](https://github.com/geooo109))*:
|
|
59
|
+
|
|
60
|
+
avoid to rewrite RIGHT JOIN ... ON TRUE to CROSS JOIN in simplify (#8340)
|
|
61
|
+
|
|
62
|
+
- due to [`a8719ad`](https://github.com/tobymao/sqlglot/commit/a8719ad6425579b8becd9434b93c9a9f0d28b05e) - preserve columns when source is a whole-row reference *(PR [#8332](https://github.com/tobymao/sqlglot/pull/8332) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
|
|
63
|
+
|
|
64
|
+
preserve columns when source is a whole-row reference (#8332)
|
|
65
|
+
|
|
66
|
+
- due to [`5cfb599`](https://github.com/tobymao/sqlglot/commit/5cfb5997a99010940138670adf3d6b34ac5a0a08) - preserve precedence when replacing aliases in predicate pushdown [GLM] *(PR [#8342](https://github.com/tobymao/sqlglot/pull/8342) by [@tobymao](https://github.com/tobymao))*:
|
|
67
|
+
|
|
68
|
+
preserve precedence when replacing aliases in predicate pushdown [GLM] (#8342)
|
|
69
|
+
|
|
70
|
+
- due to [`3ca8248`](https://github.com/tobymao/sqlglot/commit/3ca824895ef423f7895fb13d72357548c0f1f367) - preserve coalesce concat semantics closes [#8343](https://github.com/tobymao/sqlglot/pull/8343) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
71
|
+
|
|
72
|
+
preserve coalesce concat semantics closes #8343
|
|
73
|
+
|
|
74
|
+
- due to [`eee4750`](https://github.com/tobymao/sqlglot/commit/eee4750c47cf15c8a41432b21df26fdaa0a11ead) - preserve UNION ALL arm width when nested set op forces column retention *(PR [#8325](https://github.com/tobymao/sqlglot/pull/8325) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
|
|
75
|
+
|
|
76
|
+
preserve UNION ALL arm width when nested set op forces column retention (#8325)
|
|
77
|
+
|
|
78
|
+
- due to [`4b84b4d`](https://github.com/tobymao/sqlglot/commit/4b84b4d4f3e91e4f64721cb72e0590e4de72aa46) - keep scale and length for MONEY, SMALLMONEY, XML and IMAGE [CLAUDE] *(PR [#8362](https://github.com/tobymao/sqlglot/pull/8362) by [@NielsZeilemaker](https://github.com/NielsZeilemaker))*:
|
|
79
|
+
|
|
80
|
+
keep scale and length for MONEY, SMALLMONEY, XML and IMAGE [CLAUDE] (#8362)
|
|
81
|
+
|
|
82
|
+
- due to [`4eb2c99`](https://github.com/tobymao/sqlglot/commit/4eb2c99a150f56c9048a3ddf6c71dded86597362) - transpile json type to varchar(max), similar to xml *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
83
|
+
|
|
84
|
+
transpile json type to varchar(max), similar to xml
|
|
85
|
+
|
|
86
|
+
- due to [`d53cbc9`](https://github.com/tobymao/sqlglot/commit/d53cbc988512ee63ca547694c6a1656fd4dbb637) - raise on a duplicate OFFSET instead of overwriting it [CLAUDE] *(PR [#8367](https://github.com/tobymao/sqlglot/pull/8367) by [@jbylund](https://github.com/jbylund))*:
|
|
87
|
+
|
|
88
|
+
raise on a duplicate OFFSET instead of overwriting it [CLAUDE] (#8367)
|
|
89
|
+
|
|
90
|
+
- due to [`4e973f0`](https://github.com/tobymao/sqlglot/commit/4e973f0c0cd426ab2260db291d45a7a207b48356) - honor positional column aliases declared on derived tables and CTEs *(PR [#8382](https://github.com/tobymao/sqlglot/pull/8382) by [@georgesittas](https://github.com/georgesittas))*:
|
|
91
|
+
|
|
92
|
+
honor positional column aliases declared on derived tables and CTEs (#8382)
|
|
93
|
+
|
|
94
|
+
- due to [`539b112`](https://github.com/tobymao/sqlglot/commit/539b1125dbe698145057a58efaff2eb7ae2dfdbd) - get rid of `remove_unused_selections` flag in `pushdown_projections` *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
95
|
+
|
|
96
|
+
get rid of `remove_unused_selections` flag in `pushdown_projections`
|
|
97
|
+
|
|
98
|
+
- due to [`f5cb53d`](https://github.com/tobymao/sqlglot/commit/f5cb53d6d06e8dd7e7521b35d7294d7c9fa5d293) - qualify bare right-hand table column ref in SEMI/ANTI join ON *(PR [#8383](https://github.com/tobymao/sqlglot/pull/8383) by [@treysp](https://github.com/treysp))*:
|
|
99
|
+
|
|
100
|
+
qualify bare right-hand table column ref in SEMI/ANTI join ON (#8383)
|
|
101
|
+
|
|
102
|
+
- due to [`901a678`](https://github.com/tobymao/sqlglot/commit/901a67882871b9eb27ad9dfdd23380c0fca4cf1f) - preserve DuckDB DATE_TRUNC return type when simplifying. *(commit by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
103
|
+
|
|
104
|
+
preserve DuckDB DATE_TRUNC return type when simplifying.
|
|
105
|
+
|
|
106
|
+
- due to [`06c7b3d`](https://github.com/tobymao/sqlglot/commit/06c7b3dd7b656ff5ed80337ee668cf58318e002b) - preserve precedence when collapsing CASE and IF *(PR [#8389](https://github.com/tobymao/sqlglot/pull/8389) by [@georgesittas](https://github.com/georgesittas))*:
|
|
107
|
+
|
|
108
|
+
preserve precedence when collapsing CASE and IF (#8389)
|
|
109
|
+
|
|
110
|
+
- due to [`9beb769`](https://github.com/tobymao/sqlglot/commit/9beb769dbffdbabc73b4459137ce2be21678765f) - drop TIMESTAMP_LTZ precision [CODEX] *(PR [#8403](https://github.com/tobymao/sqlglot/pull/8403) by [@tekumara](https://github.com/tekumara))*:
|
|
111
|
+
|
|
112
|
+
drop TIMESTAMP_LTZ precision [CODEX] (#8403)
|
|
113
|
+
|
|
114
|
+
- due to [`eeece5a`](https://github.com/tobymao/sqlglot/commit/eeece5a564e2d5c37b73d172843e7cd437406c42) - preserve pagination scope in set operations *(PR [#8385](https://github.com/tobymao/sqlglot/pull/8385) by [@georgesittas](https://github.com/georgesittas))*:
|
|
115
|
+
|
|
116
|
+
preserve pagination scope in set operations (#8385)
|
|
117
|
+
|
|
118
|
+
- due to [`1a782c5`](https://github.com/tobymao/sqlglot/commit/1a782c55a8f2bad4ac9ca7e28b1a1b1164840894) - keep the native IF instead of changing it to CASE [CLAUDE] *(PR [#8409](https://github.com/tobymao/sqlglot/pull/8409) by [@UCHPUCHMAK](https://github.com/UCHPUCHMAK))*:
|
|
119
|
+
|
|
120
|
+
keep the native IF instead of changing it to CASE [CLAUDE] (#8409)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### :sparkles: New Features
|
|
124
|
+
- [`d7dd2cd`](https://github.com/tobymao/sqlglot/commit/d7dd2cd18fd214892136b4d0706cd65d348da285) - **optimizer**: annotate function replace for postgres *(PR [#8307](https://github.com/tobymao/sqlglot/pull/8307) by [@PiyaDaswadkar](https://github.com/PiyaDaswadkar))*
|
|
125
|
+
- [`3f154bf`](https://github.com/tobymao/sqlglot/commit/3f154bfb65ad77b2e2b71375692aee9a69f2d8da) - **mysql**: add `ALTER ... COMMENT`. *(PR [#8310](https://github.com/tobymao/sqlglot/pull/8310) by [@burnison](https://github.com/burnison))*
|
|
126
|
+
- [`8bf484c`](https://github.com/tobymao/sqlglot/commit/8bf484ce23ad684430675d60fcd82c05a957e4db) - **generator**: Fix the json path with single quote issue *(PR [#8309](https://github.com/tobymao/sqlglot/pull/8309) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
127
|
+
- :arrow_lower_right: *addresses issue [#8251](https://github.com/tobymao/sqlglot/issues/8251) opened by [@RogerHYang](https://github.com/RogerHYang)*
|
|
128
|
+
- [`3d25907`](https://github.com/tobymao/sqlglot/commit/3d259070d4c892992e9b1b247166d6056e742599) - **executor**: implement FIRST [CLAUDE] *(PR [#8319](https://github.com/tobymao/sqlglot/pull/8319) by [@jbylund](https://github.com/jbylund))*
|
|
129
|
+
- [`90d44b8`](https://github.com/tobymao/sqlglot/commit/90d44b8556a19ddf8d4d43395a39f589a42ab748) - **trino**: preserve Spark CONCAT_WS array semantics *(PR [#8391](https://github.com/tobymao/sqlglot/pull/8391) by [@georgesittas](https://github.com/georgesittas))*
|
|
130
|
+
- :arrow_lower_right: *addresses issue [#8386](https://github.com/tobymao/sqlglot/issues/8386) opened by [@xiaoyu-meng-mxy](https://github.com/xiaoyu-meng-mxy)*
|
|
131
|
+
- [`0256222`](https://github.com/tobymao/sqlglot/commit/02562228357e7d933ef66e27c56e257b88faad8f) - **parser**: supprot AGG *(PR [#8414](https://github.com/tobymao/sqlglot/pull/8414) by [@geooo109](https://github.com/geooo109))*
|
|
132
|
+
|
|
133
|
+
### :bug: Bug Fixes
|
|
134
|
+
- [`9794193`](https://github.com/tobymao/sqlglot/commit/97941935711779438b34e11edbed6a736d2ad0c6) - **parser**: preserve the order of CUBE, ROLLUP and GROUPING SETS in GROUP BY *(PR [#8312](https://github.com/tobymao/sqlglot/pull/8312) by [@georgesittas](https://github.com/georgesittas))*
|
|
135
|
+
- :arrow_lower_right: *fixes issue [#8311](https://github.com/tobymao/sqlglot/issues/8311) opened by [@wwzhe007](https://github.com/wwzhe007)*
|
|
136
|
+
- [`3086608`](https://github.com/tobymao/sqlglot/commit/3086608e6fd4c41c02dfba47171608d2b193fce2) - **trino**: prefix JSON_QUERY paths with the lax mode specifier *(PR [#8313](https://github.com/tobymao/sqlglot/pull/8313) by [@Kunal8954](https://github.com/Kunal8954))*
|
|
137
|
+
- [`18fc199`](https://github.com/tobymao/sqlglot/commit/18fc199a01f22ef2a62e68560fcb9c589a3e39df) - **optimizer**: keep projections referenced by SORT BY / DISTRIBUTE BY / CLUSTER BY *(PR [#8302](https://github.com/tobymao/sqlglot/pull/8302) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
138
|
+
- [`1d753d7`](https://github.com/tobymao/sqlglot/commit/1d753d72c6e81e39cfc7160af33673314d4d600e) - **optimizer**: EXISTS over a scalar aggregate is always true [CLAUDE] *(PR [#8304](https://github.com/tobymao/sqlglot/pull/8304) by [@jbylund](https://github.com/jbylund))*
|
|
139
|
+
- [`c9ad903`](https://github.com/tobymao/sqlglot/commit/c9ad903e7553543686472e5babf3c18e4e7dbc7b) - **optimizer**: preserve operand order when simplifying COALESCE comparisons *(PR [#8316](https://github.com/tobymao/sqlglot/pull/8316) by [@geooo109](https://github.com/geooo109))*
|
|
140
|
+
- [`106ad25`](https://github.com/tobymao/sqlglot/commit/106ad25d3500f479144a24f3130c8a45a1d547b0) - **optimizer**: decorrelation when non-EQ keys are present *(PR [#8317](https://github.com/tobymao/sqlglot/pull/8317) by [@georgesittas](https://github.com/georgesittas))*
|
|
141
|
+
- [`0d88a21`](https://github.com/tobymao/sqlglot/commit/0d88a211de50fa118e7e7185665d2f31310fceaa) - **optimizer**: don't fan out EXISTS decorrelation over grouped subqueries *(PR [#8318](https://github.com/tobymao/sqlglot/pull/8318) by [@georgesittas](https://github.com/georgesittas))*
|
|
142
|
+
- [`f22bcdb`](https://github.com/tobymao/sqlglot/commit/f22bcdbad732d9df2c02d37426cbdc27e64b5da6) - **optimizer**: preserve unreferenced UDTF and anonymous-function projections *(PR [#8314](https://github.com/tobymao/sqlglot/pull/8314) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
143
|
+
- [`0714112`](https://github.com/tobymao/sqlglot/commit/0714112aa814778ff371cc33a9441548ae6b924c) - **optimizer**: only propagate constants through non-nullable columns *(PR [#8326](https://github.com/tobymao/sqlglot/pull/8326) by [@geooo109](https://github.com/geooo109))*
|
|
144
|
+
- [`a34fc27`](https://github.com/tobymao/sqlglot/commit/a34fc276539980ee1f3d51e85a17a19f40b3f276) - **optimizer**: star referencing outer-scope from correlated subquery *(PR [#8291](https://github.com/tobymao/sqlglot/pull/8291) by [@treysp](https://github.com/treysp))*
|
|
145
|
+
- [`faa5ebf`](https://github.com/tobymao/sqlglot/commit/faa5ebf5e7195ea62996d30a1089bf3533731eb2) - **optimizer**: in simplify only move MONTH/YEAR intervals across a comparison when the move is exact *(PR [#8324](https://github.com/tobymao/sqlglot/pull/8324) by [@geooo109](https://github.com/geooo109))*
|
|
146
|
+
- [`9f604b3`](https://github.com/tobymao/sqlglot/commit/9f604b3de5967c0107404676690c82e3c3552593) - **sqlite**: preserve GREATEST/LEAST NULL semantics *(PR [#8320](https://github.com/tobymao/sqlglot/pull/8320) by [@Kunal8954](https://github.com/Kunal8954))*
|
|
147
|
+
- :arrow_lower_right: *fixes issue [#8315](https://github.com/tobymao/sqlglot/issues/8315) opened by [@abinashrasonowal](https://github.com/abinashrasonowal)*
|
|
148
|
+
- [`83abff6`](https://github.com/tobymao/sqlglot/commit/83abff6576cbc3b5858581b8ae9a912dec0f3304) - **expressions**: render a DynamicIdentifier in Table.name [CLAUDE] *(PR [#8329](https://github.com/tobymao/sqlglot/pull/8329) by [@chaitanyaatlan](https://github.com/chaitanyaatlan))*
|
|
149
|
+
- :arrow_lower_right: *fixes issue [#8328](https://github.com/tobymao/sqlglot/issues/8328) opened by [@chaitanyaatlan](https://github.com/chaitanyaatlan)*
|
|
150
|
+
- [`8b374bd`](https://github.com/tobymao/sqlglot/commit/8b374bd525eeade40cef0b02d281e7a9636b974a) - **mysql**: support`UNIQUE` with options *(PR [#8330](https://github.com/tobymao/sqlglot/pull/8330) by [@burnison](https://github.com/burnison))*
|
|
151
|
+
- [`cf8a4db`](https://github.com/tobymao/sqlglot/commit/cf8a4db927c6ce462e2962ddc9546ab4152b8626) - **snowflake**: support ROLLBACK as id var and udf name *(PR [#8334](https://github.com/tobymao/sqlglot/pull/8334) by [@treysp](https://github.com/treysp))*
|
|
152
|
+
- [`9ec72cf`](https://github.com/tobymao/sqlglot/commit/9ec72cf88314ef218face2c587957189ab10a21b) - **mysql**: parse MySQL index prefixes *(PR [#8335](https://github.com/tobymao/sqlglot/pull/8335) by [@burnison](https://github.com/burnison))*
|
|
153
|
+
- [`4559569`](https://github.com/tobymao/sqlglot/commit/45595690cfbacaad486683e019e35c4b6c653786) - **mysql**: drop implicit NULLS FIRST from UNIQUE/INDEX key parts *(commit by [@geooo109](https://github.com/geooo109))*
|
|
154
|
+
- [`70951c7`](https://github.com/tobymao/sqlglot/commit/70951c72dff3fb694040353e8db330756a242a7a) - implement `is_star` iteratively *(PR [#8337](https://github.com/tobymao/sqlglot/pull/8337) by [@georgesittas](https://github.com/georgesittas))*
|
|
155
|
+
- [`64d6f59`](https://github.com/tobymao/sqlglot/commit/64d6f59a4981d35f362fecc615a4e3ce764bebb7) - **optimizer**: for simplify fold contradictory comparisons to FALSE only for non-null columns *(PR [#8338](https://github.com/tobymao/sqlglot/pull/8338) by [@geooo109](https://github.com/geooo109))*
|
|
156
|
+
- [`56a66cd`](https://github.com/tobymao/sqlglot/commit/56a66cddf65e83080ae6534824136575bf192274) - **optimizer**: avoid to rewrite RIGHT JOIN ... ON TRUE to CROSS JOIN in simplify *(PR [#8340](https://github.com/tobymao/sqlglot/pull/8340) by [@geooo109](https://github.com/geooo109))*
|
|
157
|
+
- [`a8719ad`](https://github.com/tobymao/sqlglot/commit/a8719ad6425579b8becd9434b93c9a9f0d28b05e) - **optimizer**: preserve columns when source is a whole-row reference *(PR [#8332](https://github.com/tobymao/sqlglot/pull/8332) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
158
|
+
- [`5cfb599`](https://github.com/tobymao/sqlglot/commit/5cfb5997a99010940138670adf3d6b34ac5a0a08) - **optimizer**: preserve precedence when replacing aliases in predicate pushdown [GLM] *(PR [#8342](https://github.com/tobymao/sqlglot/pull/8342) by [@tobymao](https://github.com/tobymao))*
|
|
159
|
+
- :arrow_lower_right: *fixes issue [#8341](https://github.com/tobymao/sqlglot/issues/8341) opened by [@xiaoyu-meng-mxy](https://github.com/xiaoyu-meng-mxy)*
|
|
160
|
+
- [`5dea557`](https://github.com/tobymao/sqlglot/commit/5dea557136b0690c280c5c006257f4d681d7f3ce) - **doris**: add 15 missing words to RESERVED_KEYWORDS *(PR [#8357](https://github.com/tobymao/sqlglot/pull/8357) by [@raghav-reglobe](https://github.com/raghav-reglobe))*
|
|
161
|
+
- [`9831daa`](https://github.com/tobymao/sqlglot/commit/9831daa7b785c941ff7c7f90e7640349cec15151) - **sqlite**: correct nanosecond date difference multiplier [COPILOT] *(PR [#8346](https://github.com/tobymao/sqlglot/pull/8346) by [@PhuocOng](https://github.com/PhuocOng))*
|
|
162
|
+
- :arrow_lower_right: *fixes issue [#8345](https://github.com/tobymao/sqlglot/issues/8345) opened by [@PhuocOng](https://github.com/PhuocOng)*
|
|
163
|
+
- [`87d16d0`](https://github.com/tobymao/sqlglot/commit/87d16d022d76e642705681cb6140a544dbde24df) - **singlestore**: ignore nulls in percentile ordering [CODEX] *(PR [#8352](https://github.com/tobymao/sqlglot/pull/8352) by [@joeharris76](https://github.com/joeharris76))*
|
|
164
|
+
- [`e27b765`](https://github.com/tobymao/sqlglot/commit/e27b7654a9d710e29da6f42994de845a99444c84) - **executor**: plan DISTINCT before ORDER BY so the sort survives [CLAUDE] *(PR [#8321](https://github.com/tobymao/sqlglot/pull/8321) by [@jbylund](https://github.com/jbylund))*
|
|
165
|
+
- [`3ca8248`](https://github.com/tobymao/sqlglot/commit/3ca824895ef423f7895fb13d72357548c0f1f367) - **sqlite**: preserve coalesce concat semantics closes [#8343](https://github.com/tobymao/sqlglot/pull/8343) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
166
|
+
- [`eee4750`](https://github.com/tobymao/sqlglot/commit/eee4750c47cf15c8a41432b21df26fdaa0a11ead) - **optimizer**: preserve UNION ALL arm width when nested set op forces column retention *(PR [#8325](https://github.com/tobymao/sqlglot/pull/8325) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
167
|
+
- [`4b84b4d`](https://github.com/tobymao/sqlglot/commit/4b84b4d4f3e91e4f64721cb72e0590e4de72aa46) - **fabric**: keep scale and length for MONEY, SMALLMONEY, XML and IMAGE [CLAUDE] *(PR [#8362](https://github.com/tobymao/sqlglot/pull/8362) by [@NielsZeilemaker](https://github.com/NielsZeilemaker))*
|
|
168
|
+
- [`4eb2c99`](https://github.com/tobymao/sqlglot/commit/4eb2c99a150f56c9048a3ddf6c71dded86597362) - **fabric**: transpile json type to varchar(max), similar to xml *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
169
|
+
- [`a069a09`](https://github.com/tobymao/sqlglot/commit/a069a0964418188e3822e8bf9238af6b89db0652) - **tsql**: parse FORMAT(x, 'ffffff') as a time format *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
170
|
+
- [`338bb06`](https://github.com/tobymao/sqlglot/commit/338bb0699385f8a35f76c98954c58b920da679b5) - **sqlite**: evaluate dynamic date-add amounts [COPILOT] *(PR [#8360](https://github.com/tobymao/sqlglot/pull/8360) by [@PhuocOng](https://github.com/PhuocOng))*
|
|
171
|
+
- :arrow_lower_right: *fixes issue [#8359](https://github.com/tobymao/sqlglot/issues/8359) opened by [@PhuocOng](https://github.com/PhuocOng)*
|
|
172
|
+
- [`e946396`](https://github.com/tobymao/sqlglot/commit/e94639635d388cf6b58dd79d643a62082d2305cb) - **optimizer**: preserve COALESCE fallbacks after NULL [CODEX] *(PR [#8364](https://github.com/tobymao/sqlglot/pull/8364) by [@Kuang-xianxin](https://github.com/Kuang-xianxin))*
|
|
173
|
+
- [`d53cbc9`](https://github.com/tobymao/sqlglot/commit/d53cbc988512ee63ca547694c6a1656fd4dbb637) - **parser**: raise on a duplicate OFFSET instead of overwriting it [CLAUDE] *(PR [#8367](https://github.com/tobymao/sqlglot/pull/8367) by [@jbylund](https://github.com/jbylund))*
|
|
174
|
+
- [`fa73693`](https://github.com/tobymao/sqlglot/commit/fa73693547ad5a88ccbbe90fad1196b3153198ed) - **parser**: support OPERATOR as implicit alias *(PR [#8365](https://github.com/tobymao/sqlglot/pull/8365) by [@treysp](https://github.com/treysp))*
|
|
175
|
+
- [`65eb23b`](https://github.com/tobymao/sqlglot/commit/65eb23b53420212c20f394d399ca18efefec90e3) - **spark**: emit SQL function determinism correctly [CODEX] *(PR [#8369](https://github.com/tobymao/sqlglot/pull/8369) by [@jaideeppyne](https://github.com/jaideeppyne))*
|
|
176
|
+
- :arrow_lower_right: *fixes issue [#8368](https://github.com/tobymao/sqlglot/issues/8368) opened by [@EhabEasee](https://github.com/EhabEasee)*
|
|
177
|
+
- [`76004d7`](https://github.com/tobymao/sqlglot/commit/76004d7f33b2365e5e0d66917c18422070fda129) - **sqlite**: emit GROUP_CONCAT ORDER BY instead of dropping it [CODEX] *(PR [#8373](https://github.com/tobymao/sqlglot/pull/8373) by [@jaideeppyne](https://github.com/jaideeppyne))*
|
|
178
|
+
- [`4e973f0`](https://github.com/tobymao/sqlglot/commit/4e973f0c0cd426ab2260db291d45a7a207b48356) - **optimizer**: honor positional column aliases declared on derived tables and CTEs *(PR [#8382](https://github.com/tobymao/sqlglot/pull/8382) by [@georgesittas](https://github.com/georgesittas))*
|
|
179
|
+
- [`f5cb53d`](https://github.com/tobymao/sqlglot/commit/f5cb53d6d06e8dd7e7521b35d7294d7c9fa5d293) - **optimizer**: qualify bare right-hand table column ref in SEMI/ANTI join ON *(PR [#8383](https://github.com/tobymao/sqlglot/pull/8383) by [@treysp](https://github.com/treysp))*
|
|
180
|
+
- [`901a678`](https://github.com/tobymao/sqlglot/commit/901a67882871b9eb27ad9dfdd23380c0fca4cf1f) - **optimizer**: preserve DuckDB DATE_TRUNC return type when simplifying. *(commit by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
181
|
+
- [`a470787`](https://github.com/tobymao/sqlglot/commit/a470787be21812ba235963c41f23107e3502c00b) - **optimizer**: prevent merge_subqueries from folding set-returning projections *(PR [#8379](https://github.com/tobymao/sqlglot/pull/8379) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
182
|
+
- [`06c7b3d`](https://github.com/tobymao/sqlglot/commit/06c7b3dd7b656ff5ed80337ee668cf58318e002b) - **optimizer**: preserve precedence when collapsing CASE and IF *(PR [#8389](https://github.com/tobymao/sqlglot/pull/8389) by [@georgesittas](https://github.com/georgesittas))*
|
|
183
|
+
- :arrow_lower_right: *fixes issue [#8380](https://github.com/tobymao/sqlglot/issues/8380) opened by [@Rodrigo-Palma](https://github.com/Rodrigo-Palma)*
|
|
184
|
+
- [`9bc418a`](https://github.com/tobymao/sqlglot/commit/9bc418af0e03220a6eb5289a009bd79328e7cfd1) - **snowflake**: parse unquoted PUT sources as exp.Put [CODEX] *(PR [#8400](https://github.com/tobymao/sqlglot/pull/8400) by [@tekumara](https://github.com/tekumara))*
|
|
185
|
+
- :arrow_lower_right: *fixes issue [#8399](https://github.com/tobymao/sqlglot/issues/8399) opened by [@tekumara](https://github.com/tekumara)*
|
|
186
|
+
- [`9beb769`](https://github.com/tobymao/sqlglot/commit/9beb769dbffdbabc73b4459137ce2be21678765f) - **duckdb**: drop TIMESTAMP_LTZ precision [CODEX] *(PR [#8403](https://github.com/tobymao/sqlglot/pull/8403) by [@tekumara](https://github.com/tekumara))*
|
|
187
|
+
- :arrow_lower_right: *fixes issue [#8402](https://github.com/tobymao/sqlglot/issues/8402) opened by [@tekumara](https://github.com/tekumara)*
|
|
188
|
+
- [`8b6ff93`](https://github.com/tobymao/sqlglot/commit/8b6ff9386ddf4f6f8e3120a21f1991a384e60abd) - **executor**: support DISTINCT calculations CLAUDE *(PR [#8395](https://github.com/tobymao/sqlglot/pull/8395) by [@rubytobi](https://github.com/rubytobi))*
|
|
189
|
+
- [`eeece5a`](https://github.com/tobymao/sqlglot/commit/eeece5a564e2d5c37b73d172843e7cd437406c42) - preserve pagination scope in set operations *(PR [#8385](https://github.com/tobymao/sqlglot/pull/8385) by [@georgesittas](https://github.com/georgesittas))*
|
|
190
|
+
- [`8c3b989`](https://github.com/tobymao/sqlglot/commit/8c3b9893f72f0913fa0a8a4188d55c8cc6692ad5) - **mysql**: SHOW CREATE TABLE generating a syntax error [CLAUDE] *(PR [#8408](https://github.com/tobymao/sqlglot/pull/8408) by [@UCHPUCHMAK](https://github.com/UCHPUCHMAK))*
|
|
191
|
+
- [`1a782c5`](https://github.com/tobymao/sqlglot/commit/1a782c55a8f2bad4ac9ca7e28b1a1b1164840894) - **mysql**: keep the native IF instead of changing it to CASE [CLAUDE] *(PR [#8409](https://github.com/tobymao/sqlglot/pull/8409) by [@UCHPUCHMAK](https://github.com/UCHPUCHMAK))*
|
|
192
|
+
|
|
193
|
+
### :recycle: Refactors
|
|
194
|
+
- [`bbb717e`](https://github.com/tobymao/sqlglot/commit/bbb717ebb24c8dcbee94d77c9154e74da1dc6c10) - rename union scope type to set operation for consistency *(PR [#8306](https://github.com/tobymao/sqlglot/pull/8306) by [@georgesittas](https://github.com/georgesittas))*
|
|
195
|
+
- [`5fac41e`](https://github.com/tobymao/sqlglot/commit/5fac41edc6d81e9bad5a5d6a64888de4f80ff598) - **optimizer**: skip projection pushdown early *(PR [#8336](https://github.com/tobymao/sqlglot/pull/8336) by [@georgesittas](https://github.com/georgesittas))*
|
|
196
|
+
|
|
197
|
+
### :white_check_mark: Tests
|
|
198
|
+
- [`1928165`](https://github.com/tobymao/sqlglot/commit/1928165c7d9085b783f8f0c4eec2d6b12fd49a2c) - recognize Windows compiled extensions [COPILOT] *(PR [#8354](https://github.com/tobymao/sqlglot/pull/8354) by [@PhuocOng](https://github.com/PhuocOng))*
|
|
199
|
+
- :arrow_lower_right: *addresses issue [#8353](https://github.com/tobymao/sqlglot/issues/8353) opened by [@PhuocOng](https://github.com/PhuocOng)*
|
|
200
|
+
|
|
201
|
+
### :wrench: Chores
|
|
202
|
+
- [`9d322b9`](https://github.com/tobymao/sqlglot/commit/9d322b95cffbf09964f4b1b4dcfe0b17813d6b84) - handle `.pyd` suffix (windows builds) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
203
|
+
- [`b6aebcd`](https://github.com/tobymao/sqlglot/commit/b6aebcde1f6722142dbd812715cc5db6e5dc54f4) - refactor NOT DETERMINISTIC on base *(PR [#8376](https://github.com/tobymao/sqlglot/pull/8376) by [@geooo109](https://github.com/geooo109))*
|
|
204
|
+
- [`19077cc`](https://github.com/tobymao/sqlglot/commit/19077cc891003183ab2cffe2bd999c83fa7d9168) - sqlite GROUP_CONCAT refactor *(PR [#8377](https://github.com/tobymao/sqlglot/pull/8377) by [@geooo109](https://github.com/geooo109))*
|
|
205
|
+
- [`539b112`](https://github.com/tobymao/sqlglot/commit/539b1125dbe698145057a58efaff2eb7ae2dfdbd) - **optimizer**: get rid of `remove_unused_selections` flag in `pushdown_projections` *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
206
|
+
|
|
207
|
+
|
|
4
208
|
## [v30.18.0] - 2026-09-03
|
|
5
209
|
### :boom: BREAKING CHANGES
|
|
6
210
|
- due to [`8f60665`](https://github.com/tobymao/sqlglot/commit/8f606659077c0380cfbfe2ae53bd43583f41c4cf) - annotate decode for postgres *(PR [#8157](https://github.com/tobymao/sqlglot/pull/8157) by [@PiyaDaswadkar](https://github.com/PiyaDaswadkar))*:
|
|
@@ -15716,3 +15920,4 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
15716
15920
|
[v30.16.0]: https://github.com/tobymao/sqlglot/compare/v30.15.0...v30.16.0
|
|
15717
15921
|
[v30.17.0]: https://github.com/tobymao/sqlglot/compare/v30.16.0...v30.17.0
|
|
15718
15922
|
[v30.18.0]: https://github.com/tobymao/sqlglot/compare/v30.17.0...v30.18.0
|
|
15923
|
+
[v30.19.0]: https://github.com/tobymao/sqlglot/compare/v30.18.0...v30.19.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.20.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.20.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.20.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.20.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 20, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g8bd768664'
|
|
@@ -248,4 +248,4 @@ class ParseJSON(Expression, Func):
|
|
|
248
248
|
# BigQuery, Snowflake have PARSE_JSON, Presto has JSON_PARSE
|
|
249
249
|
# Snowflake also has TRY_PARSE_JSON, which is represented using `safe`
|
|
250
250
|
_sql_names = ["PARSE_JSON", "JSON_PARSE"]
|
|
251
|
-
arg_types = {"this": True, "expression": False, "safe": False}
|
|
251
|
+
arg_types = {"this": True, "expression": False, "safe": False, "is_literal": False}
|
|
@@ -4942,15 +4942,20 @@ class Generator:
|
|
|
4942
4942
|
def tonumber_sql(self, expression: exp.ToNumber) -> str:
|
|
4943
4943
|
if not self.SUPPORTS_TO_NUMBER:
|
|
4944
4944
|
self.unsupported("Unsupported TO_NUMBER function")
|
|
4945
|
-
return self.
|
|
4945
|
+
return self._tonumber_cast_sql(expression)
|
|
4946
4946
|
|
|
4947
4947
|
fmt = expression.args.get("format")
|
|
4948
4948
|
if not fmt:
|
|
4949
4949
|
self.unsupported("Conversion format is required for TO_NUMBER")
|
|
4950
|
-
return self.
|
|
4950
|
+
return self._tonumber_cast_sql(expression)
|
|
4951
4951
|
|
|
4952
4952
|
return self.func("TO_NUMBER", expression.this, fmt)
|
|
4953
4953
|
|
|
4954
|
+
def _tonumber_cast_sql(self, expression: exp.ToNumber) -> str:
|
|
4955
|
+
if expression.args.get("safe"):
|
|
4956
|
+
return self.sql(exp.TryCast(this=expression.this, to=exp.DataType.build("DOUBLE")))
|
|
4957
|
+
return self.sql(exp.cast(expression.this, exp.DType.DOUBLE))
|
|
4958
|
+
|
|
4954
4959
|
def dictproperty_sql(self, expression: exp.DictProperty) -> str:
|
|
4955
4960
|
this = self.sql(expression, "this")
|
|
4956
4961
|
kind = self.sql(expression, "kind")
|
|
@@ -713,6 +713,11 @@ class BigQueryGenerator(generator.Generator):
|
|
|
713
713
|
|
|
714
714
|
return self.func("CONTAINS_SUBSTR", this, expr, expression.args.get("json_scope"))
|
|
715
715
|
|
|
716
|
+
def parsejson_sql(self, expression: exp.ParseJSON) -> str:
|
|
717
|
+
if expression.args.get("is_literal"):
|
|
718
|
+
return f"JSON {self.sql(expression, 'this')}"
|
|
719
|
+
return super().parsejson_sql(expression)
|
|
720
|
+
|
|
716
721
|
def cast_sql(self, expression: exp.Cast, safe_prefix: str | None = None) -> str:
|
|
717
722
|
this = expression.this
|
|
718
723
|
|
|
@@ -2577,11 +2577,10 @@ class DuckDBGenerator(generator.Generator):
|
|
|
2577
2577
|
scale = expression.args.get("scale")
|
|
2578
2578
|
|
|
2579
2579
|
if not fmt and precision and scale:
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
)
|
|
2580
|
+
to = exp.DataType.build(f"DECIMAL({precision.name}, {scale.name})", dialect="duckdb")
|
|
2581
|
+
if expression.args.get("safe"):
|
|
2582
|
+
return self.sql(exp.TryCast(this=expression.this, to=to))
|
|
2583
|
+
return self.sql(exp.cast(expression.this, to, dialect="duckdb"))
|
|
2585
2584
|
|
|
2586
2585
|
return super().tonumber_sql(expression)
|
|
2587
2586
|
|
|
@@ -3075,6 +3074,9 @@ class DuckDBGenerator(generator.Generator):
|
|
|
3075
3074
|
if milli or nano:
|
|
3076
3075
|
expression.set("sec", sec)
|
|
3077
3076
|
|
|
3077
|
+
if zone := expression.args.get("zone"):
|
|
3078
|
+
return self.sql(exp.AtTimeZone(this=expression, zone=zone.pop()))
|
|
3079
|
+
|
|
3078
3080
|
return rename_func("MAKE_TIMESTAMP")(self, expression)
|
|
3079
3081
|
|
|
3080
3082
|
@unsupported_args("nano")
|
|
@@ -154,9 +154,9 @@ class MySQLGenerator(generator.Generator):
|
|
|
154
154
|
exp.DateDiff: remove_ts_or_ds_to_date(
|
|
155
155
|
lambda self, e: self.func("DATEDIFF", e.this, e.expression), ("this", "expression")
|
|
156
156
|
),
|
|
157
|
-
exp.DateAdd:
|
|
157
|
+
exp.DateAdd: date_add_sql("ADD"),
|
|
158
158
|
exp.DateStrToDate: datestrtodate_sql,
|
|
159
|
-
exp.DateSub:
|
|
159
|
+
exp.DateSub: date_add_sql("SUB"),
|
|
160
160
|
exp.DateTrunc: _date_trunc_sql,
|
|
161
161
|
exp.Day: remove_ts_or_ds_to_date(),
|
|
162
162
|
exp.DayOfMonth: remove_ts_or_ds_to_date(rename_func("DAYOFMONTH")),
|
|
@@ -20,7 +20,7 @@ from sqlglot.tokens import TokenType
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def _transform_create(expression: exp.Expr) -> exp.Expr:
|
|
23
|
-
"""Move primary key to a column and
|
|
23
|
+
"""Move primary key to a column and place auto_increment after it."""
|
|
24
24
|
schema = expression.this
|
|
25
25
|
|
|
26
26
|
if isinstance(expression, exp.Create) and isinstance(schema, exp.Schema):
|
|
@@ -52,12 +52,9 @@ def _transform_create(expression: exp.Expr) -> exp.Expr:
|
|
|
52
52
|
auto_increment = constraint
|
|
53
53
|
auto_increment_index = i
|
|
54
54
|
|
|
55
|
-
if auto_increment is not None and
|
|
56
|
-
primary_key_index == -1 or auto_increment_index < primary_key_index
|
|
57
|
-
):
|
|
55
|
+
if auto_increment is not None and 0 <= auto_increment_index < primary_key_index:
|
|
58
56
|
column.constraints.remove(auto_increment)
|
|
59
|
-
|
|
60
|
-
column.constraints.insert(primary_key_index, auto_increment)
|
|
57
|
+
column.constraints.insert(primary_key_index, auto_increment)
|
|
61
58
|
|
|
62
59
|
return expression
|
|
63
60
|
|
|
@@ -206,6 +203,16 @@ class SQLiteGenerator(generator.Generator):
|
|
|
206
203
|
|
|
207
204
|
LIMIT_FETCH = "LIMIT"
|
|
208
205
|
|
|
206
|
+
def autoincrementcolumnconstraint_sql(
|
|
207
|
+
self, expression: exp.AutoIncrementColumnConstraint
|
|
208
|
+
) -> str:
|
|
209
|
+
column = expression.find_ancestor(exp.ColumnDef)
|
|
210
|
+
if column and column.find(exp.PrimaryKeyColumnConstraint):
|
|
211
|
+
return super().autoincrementcolumnconstraint_sql(expression)
|
|
212
|
+
|
|
213
|
+
self.unsupported("SQLite AUTOINCREMENT requires an INTEGER PRIMARY KEY")
|
|
214
|
+
return ""
|
|
215
|
+
|
|
209
216
|
def insert_sql(self, expression: exp.Insert) -> str:
|
|
210
217
|
if expression.args.get("ignore"):
|
|
211
218
|
expression.set("ignore", False)
|
|
@@ -12,6 +12,7 @@ from sqlglot.dialects.dialect import (
|
|
|
12
12
|
property_sql,
|
|
13
13
|
var_map_sql,
|
|
14
14
|
)
|
|
15
|
+
from sqlglot.generator import Generator
|
|
15
16
|
from sqlglot.generators.mysql import MySQLGenerator
|
|
16
17
|
|
|
17
18
|
|
|
@@ -292,6 +293,24 @@ class StarRocksGenerator(MySQLGenerator):
|
|
|
292
293
|
"with",
|
|
293
294
|
}
|
|
294
295
|
|
|
296
|
+
def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
|
|
297
|
+
# IGNORE NULLS follows the first argument, e.g. LAG(x IGNORE NULLS, 1, 0)
|
|
298
|
+
# https://docs.starrocks.io/docs/sql-reference/sql-functions/Window_function/
|
|
299
|
+
func = expression.this
|
|
300
|
+
if isinstance(func, (exp.FirstValue, exp.LastValue, exp.Lag, exp.Lead)):
|
|
301
|
+
return self.func(
|
|
302
|
+
func.sql_name(),
|
|
303
|
+
Generator.ignorenulls_sql(self, exp.IgnoreNulls(this=func.this)),
|
|
304
|
+
func.args.get("offset"),
|
|
305
|
+
func.args.get("default"),
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
return super().ignorenulls_sql(expression)
|
|
309
|
+
|
|
310
|
+
def respectnulls_sql(self, expression: exp.RespectNulls) -> str:
|
|
311
|
+
# RESPECT NULLS is the default behavior, and StarRocks rejects the keyword
|
|
312
|
+
return self.sql(expression, "this")
|
|
313
|
+
|
|
295
314
|
def create_sql(self, expression: exp.Create) -> str:
|
|
296
315
|
# Starrocks' primary key is defined outside of the schema, so we need to move it there
|
|
297
316
|
schema = expression.this
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from sqlglot import exp
|
|
4
|
+
from sqlglot.optimizer.scope import find_in_scope, walk_in_scope
|
|
5
|
+
|
|
6
|
+
WINDOW_HAS_AGGREGATE = "window_has_aggregate"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def projection_has_aggregate(
|
|
10
|
+
projection: exp.Expr,
|
|
11
|
+
windows: list[exp.Window] | None = None,
|
|
12
|
+
) -> bool:
|
|
13
|
+
windowed_aggregates: set[int] = set()
|
|
14
|
+
remaining_windows = {window.name: window for window in windows or []}
|
|
15
|
+
|
|
16
|
+
for node in walk_in_scope(projection):
|
|
17
|
+
if isinstance(node, exp.Window):
|
|
18
|
+
target = node.this
|
|
19
|
+
|
|
20
|
+
# parens, FILTER and IGNORE NULLS wrap that function without changing which one it is
|
|
21
|
+
while isinstance(target, exp.Expr) and not isinstance(target, exp.Func):
|
|
22
|
+
target = target.this
|
|
23
|
+
|
|
24
|
+
if isinstance(target, exp.AggFunc):
|
|
25
|
+
windowed_aggregates.add(id(target))
|
|
26
|
+
|
|
27
|
+
# WINDOW w AS (...)
|
|
28
|
+
# ^ this is the node's alias
|
|
29
|
+
name = node.alias
|
|
30
|
+
|
|
31
|
+
# The loop below handles named window inheritance, e.g.:
|
|
32
|
+
# WINDOW w1 AS (PARTITION BY SUM(x)), w2 AS (w1 ORDER BY 1), w3 AS (w2)
|
|
33
|
+
while name:
|
|
34
|
+
window = remaining_windows.pop(name, None)
|
|
35
|
+
if window is None:
|
|
36
|
+
break
|
|
37
|
+
|
|
38
|
+
has_aggregate = window.meta_get(WINDOW_HAS_AGGREGATE)
|
|
39
|
+
if has_aggregate is None:
|
|
40
|
+
has_aggregate = bool(find_in_scope(window, exp.AggFunc))
|
|
41
|
+
window.meta[WINDOW_HAS_AGGREGATE] = has_aggregate
|
|
42
|
+
if has_aggregate:
|
|
43
|
+
return True
|
|
44
|
+
|
|
45
|
+
name = window.alias
|
|
46
|
+
elif isinstance(node, exp.AggFunc) and id(node) not in windowed_aggregates:
|
|
47
|
+
return True
|
|
48
|
+
|
|
49
|
+
return False
|