sqlglot 30.1.0__tar.gz → 30.2.1__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.1.0 → sqlglot-30.2.1}/CHANGELOG.md +216 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/Makefile +5 -2
- {sqlglot-30.1.0/sqlglot.egg-info → sqlglot-30.2.1}/PKG-INFO +3 -3
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/__init__.py +26 -8
- sqlglot-30.2.1/sqlglot/_typing.py +51 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/_version.py +3 -3
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/athena.py +10 -40
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/bigquery.py +2 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/dialect.py +30 -22
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/__init__.py +1 -12
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/builders.py +80 -47
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/core.py +138 -110
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/datatypes.py +26 -16
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/dml.py +15 -10
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/functions.py +10 -2
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/json.py +4 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/math.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/properties.py +8 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/query.py +52 -46
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/string.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generator.py +46 -14
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/bigquery.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/clickhouse.py +2 -5
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/databricks.py +12 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/duckdb.py +49 -18
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/hive.py +3 -7
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/postgres.py +5 -3
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/presto.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/sqlite.py +2 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/helper.py +16 -14
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/jsonpath.py +4 -2
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/lineage.py +3 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/annotate_types.py +90 -70
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/qualify_tables.py +4 -3
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/simplify.py +39 -34
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parser.py +13 -11
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/athena.py +13 -8
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/bigquery.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/clickhouse.py +6 -8
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/dremio.py +2 -2
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/duckdb.py +13 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/hive.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/redshift.py +5 -4
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/singlestore.py +1 -4
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/snowflake.py +8 -7
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/sqlite.py +15 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/schema.py +4 -4
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/tokenizer_core.py +6 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/tokens.py +13 -13
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/transforms.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/bigquery.py +2 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/snowflake.py +2 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1/sqlglot.egg-info}/PKG-INFO +3 -3
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot.egg-info/SOURCES.txt +2 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglotc/setup.py +2 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_bigquery.py +1 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_databricks.py +2 -2
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_duckdb.py +41 -6
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_oracle.py +1 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_postgres.py +4 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_snowflake.py +25 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_sqlite.py +7 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/annotate_functions.sql +8 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/optimizer.sql +24 -1
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/simplify.sql +30 -0
- sqlglot-30.2.1/tests/sqlglot/__init__.py +7 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_integration_loader.py +1 -3
- sqlglot-30.1.0/sqlglot/_typing.py +0 -11
- {sqlglot-30.1.0 → sqlglot-30.2.1}/.gitignore +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/.gitmodules +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/.gitpod.yml +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/AGENTS.md +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/CLAUDE.md +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/CONTRIBUTING.md +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/LICENSE +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/MANIFEST.in +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/README.md +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/pyproject.toml +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/setup.cfg +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/setup.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/__main__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/diff.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/errors.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/array.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/expressions/temporal.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/exasol.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/mysql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/redshift.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/snowflake.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/spark.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/spark2.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/trino.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/generators/tsql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/merge_subqueries.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/pushdown_predicates.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/qualify_columns.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/scope.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/databricks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/exasol.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/oracle.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/postgres.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/presto.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/spark2.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/planner.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/py.typed +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/serde.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/time.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/trie.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/duckdb.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/hive.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglot.png +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_clickhouse.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_dialect.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_hive.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_mysql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_presto.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_redshift.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_spark.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_trino.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/dialects/test_tsql.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/pushdown_projections.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/qualify_columns.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/helpers.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_build.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_diff.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_docs.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_errors.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_executor.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_expressions.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_generator.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_helper.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_lineage.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_optimizer.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_parser.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_schema.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_serde.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_time.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_tokens.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_transforms.py +0 -0
- {sqlglot-30.1.0 → sqlglot-30.2.1}/tests/test_transpile.py +0 -0
|
@@ -1,6 +1,220 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.2.0] - 2026-04-01
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`4bc6857`](https://github.com/tobymao/sqlglot/commit/4bc685708cbff4fc8590353908cd58905ee98440) - Transpilation support for STRIP_NULL_VALUE transpilation *(PR [#7403](https://github.com/tobymao/sqlglot/pull/7403) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
|
|
7
|
+
|
|
8
|
+
Transpilation support for STRIP_NULL_VALUE transpilation (#7403)
|
|
9
|
+
|
|
10
|
+
- due to [`e27477f`](https://github.com/tobymao/sqlglot/commit/e27477f3aa5f555abfab046bc9c9de8062578dfc) - Compile annotate_types.py with mypyc *(PR [#7407](https://github.com/tobymao/sqlglot/pull/7407) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
11
|
+
|
|
12
|
+
Compile annotate_types.py with mypyc (#7407)
|
|
13
|
+
|
|
14
|
+
- due to [`31595ba`](https://github.com/tobymao/sqlglot/commit/31595ba4c5a8192db1ce681149becc152fa208c4) - Compile simplify.py with mypyc *(PR [#7415](https://github.com/tobymao/sqlglot/pull/7415) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
15
|
+
|
|
16
|
+
Compile simplify.py with mypyc (#7415)
|
|
17
|
+
|
|
18
|
+
- due to [`395ada8`](https://github.com/tobymao/sqlglot/commit/395ada860c88407ac1dfbe6c49942192e5623409) - Transpilation support for UNICODE transpilation. *(PR [#7408](https://github.com/tobymao/sqlglot/pull/7408) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
|
|
19
|
+
|
|
20
|
+
Transpilation support for UNICODE transpilation. (#7408)
|
|
21
|
+
|
|
22
|
+
- due to [`7a91128`](https://github.com/tobymao/sqlglot/commit/7a911286c03fe075b99d2af5c671b9b0c12ef0be) - give precises types to all **opts argument, optimize `ensure_list()` *(PR [#7393](https://github.com/tobymao/sqlglot/pull/7393) by [@OutSquareCapital](https://github.com/OutSquareCapital))*:
|
|
23
|
+
|
|
24
|
+
give precises types to all **opts argument, optimize `ensure_list()` (#7393)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### :sparkles: New Features
|
|
28
|
+
- [`3f4e92e`](https://github.com/tobymao/sqlglot/commit/3f4e92e6536ed7b14d832b220be64dfe475454d4) - **duckdb**: Add transpilation support to TRY_PARSE_JSON *(PR [#7406](https://github.com/tobymao/sqlglot/pull/7406) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
29
|
+
- [`4bc6857`](https://github.com/tobymao/sqlglot/commit/4bc685708cbff4fc8590353908cd58905ee98440) - **snowflake**: Transpilation support for STRIP_NULL_VALUE transpilation *(PR [#7403](https://github.com/tobymao/sqlglot/pull/7403) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
30
|
+
- [`395ada8`](https://github.com/tobymao/sqlglot/commit/395ada860c88407ac1dfbe6c49942192e5623409) - **snowflake**: Transpilation support for UNICODE transpilation. *(PR [#7408](https://github.com/tobymao/sqlglot/pull/7408) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
31
|
+
- [`8bebadf`](https://github.com/tobymao/sqlglot/commit/8bebadf653d01b62570cb2936b1f3df81776316c) - **duckdb**: Support DuckDB table functions *(PR [#7410](https://github.com/tobymao/sqlglot/pull/7410) by [@pittst3r](https://github.com/pittst3r))*
|
|
32
|
+
- [`62d7176`](https://github.com/tobymao/sqlglot/commit/62d7176f6d4446f3f9ac7b8cbf1b44c2ae9a8551) - **duckdb**: Add transpilation support for BIT_LENGTH *(PR [#7421](https://github.com/tobymao/sqlglot/pull/7421) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
33
|
+
- [`c2b69d4`](https://github.com/tobymao/sqlglot/commit/c2b69d4dca0ac4154542e851be11ec7298577c5f) - **sqlite**: support virtual table ddl closes [#7425](https://github.com/tobymao/sqlglot/pull/7425) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
34
|
+
- [`3f31ffe`](https://github.com/tobymao/sqlglot/commit/3f31ffeacaa5b3b4b0ffd8ac8b874eb7f44ae5cb) - **duckdb**: Add transpilation support for CHR function. *(PR [#7430](https://github.com/tobymao/sqlglot/pull/7430) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
35
|
+
|
|
36
|
+
### :bug: Bug Fixes
|
|
37
|
+
- [`22a5bc2`](https://github.com/tobymao/sqlglot/commit/22a5bc28bee0d8bd9fb62d22e98306d65c992b20) - **optimizer**: simplify ranges with negative constants *(PR [#7405](https://github.com/tobymao/sqlglot/pull/7405) by [@geooo109](https://github.com/geooo109))*
|
|
38
|
+
- [`24738e4`](https://github.com/tobymao/sqlglot/commit/24738e470d0c1b000f820b9920ed728f39aff5b1) - **bigquery**: nested queries in EXPORT statement fixes [#7409](https://github.com/tobymao/sqlglot/pull/7409) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
39
|
+
- [`2ac9a20`](https://github.com/tobymao/sqlglot/commit/2ac9a203db099d3e99c50c7fbfc5ad27a1ae9e28) - **duckdb**: support TRUNC with decimal arg *(PR [#7414](https://github.com/tobymao/sqlglot/pull/7414) by [@geooo109](https://github.com/geooo109))*
|
|
40
|
+
- :arrow_lower_right: *fixes issue [#7413](https://github.com/tobymao/sqlglot/issues/7413) opened by [@OutSquareCapital](https://github.com/OutSquareCapital)*
|
|
41
|
+
- [`64c4438`](https://github.com/tobymao/sqlglot/commit/64c4438d6c93439cadfcf9de1b9ed42ff72eb9ff) - **duckdb**: transpilation for snowflake TRUNC with non integer scale *(PR [#7417](https://github.com/tobymao/sqlglot/pull/7417) by [@geooo109](https://github.com/geooo109))*
|
|
42
|
+
- [`9068242`](https://github.com/tobymao/sqlglot/commit/9068242bfa93356941d3e53654a7c6c3e8885a8d) - **bigquery**: support hyphen, numbers, single dot as JSON keys *(PR [#7420](https://github.com/tobymao/sqlglot/pull/7420) by [@geooo109](https://github.com/geooo109))*
|
|
43
|
+
- [`8e0b9f5`](https://github.com/tobymao/sqlglot/commit/8e0b9f56f960922bc5b3d6df63734279c7b558ab) - **snowflake**: Fix annotate_types crashes for FLATTEN over STRUCT and WithinGroup *(PR [#7434](https://github.com/tobymao/sqlglot/pull/7434) by [@georgesittas](https://github.com/georgesittas))*
|
|
44
|
+
|
|
45
|
+
### :zap: Performance Improvements
|
|
46
|
+
- [`38957cc`](https://github.com/tobymao/sqlglot/commit/38957ccd6f442da81b0ad2230f246892b283ec6d) - cache generator dispatch table for faster sql() [CLAUDE] *(PR [#7404](https://github.com/tobymao/sqlglot/pull/7404) by [@tobymao](https://github.com/tobymao))*
|
|
47
|
+
|
|
48
|
+
### :recycle: Refactors
|
|
49
|
+
- [`e27477f`](https://github.com/tobymao/sqlglot/commit/e27477f3aa5f555abfab046bc9c9de8062578dfc) - **optimizer**: Compile annotate_types.py with mypyc *(PR [#7407](https://github.com/tobymao/sqlglot/pull/7407) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
50
|
+
- [`31595ba`](https://github.com/tobymao/sqlglot/commit/31595ba4c5a8192db1ce681149becc152fa208c4) - **optimizer**: Compile simplify.py with mypyc *(PR [#7415](https://github.com/tobymao/sqlglot/pull/7415) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
51
|
+
- [`247548f`](https://github.com/tobymao/sqlglot/commit/247548f5913ebfd8666432ff1f089df0fb16f69a) - **Expressions**: add into_expr method to DType enum *(PR [#7411](https://github.com/tobymao/sqlglot/pull/7411) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
52
|
+
- [`7a91128`](https://github.com/tobymao/sqlglot/commit/7a911286c03fe075b99d2af5c671b9b0c12ef0be) - give precises types to all **opts argument, optimize `ensure_list()` *(PR [#7393](https://github.com/tobymao/sqlglot/pull/7393) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
53
|
+
- [`ab8f808`](https://github.com/tobymao/sqlglot/commit/ab8f808b2e24543b9056f022bbbae7b479154a91) - **expressions**: Remove mypyc __init_subclass__ workaround and simplify EXPR_CLASSES *(PR [#7426](https://github.com/tobymao/sqlglot/pull/7426) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
54
|
+
|
|
55
|
+
### :wrench: Chores
|
|
56
|
+
- [`ce16997`](https://github.com/tobymao/sqlglot/commit/ce16997f7fd81bfebc65a80b70112069f98b8d63) - clean tokenizer/dialect code from **opts, and minor typing improvements *(PR [#7422](https://github.com/tobymao/sqlglot/pull/7422) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [v30.1.0] - 2026-03-26
|
|
60
|
+
### :boom: BREAKING CHANGES
|
|
61
|
+
- due to [`0921899`](https://github.com/tobymao/sqlglot/commit/0921899cb663b99b888b180dcb7f54750232f209) - support for TEXTLEN function *(PR [#7346](https://github.com/tobymao/sqlglot/pull/7346) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
|
|
62
|
+
|
|
63
|
+
support for TEXTLEN function (#7346)
|
|
64
|
+
|
|
65
|
+
- due to [`83e7851`](https://github.com/tobymao/sqlglot/commit/83e785140b75faa87bc375a85dc72b9b9d710563) - Compile base Generator with mypyc *(PR [#7351](https://github.com/tobymao/sqlglot/pull/7351) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
66
|
+
|
|
67
|
+
Compile base Generator with mypyc (#7351)
|
|
68
|
+
|
|
69
|
+
- due to [`a424037`](https://github.com/tobymao/sqlglot/commit/a4240370d28c47ac7e2ef62ac5dda60720ba9870) - Extract and compile generator *(PR [#7362](https://github.com/tobymao/sqlglot/pull/7362) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
70
|
+
|
|
71
|
+
Extract and compile generator (#7362)
|
|
72
|
+
|
|
73
|
+
- due to [`a482dc5`](https://github.com/tobymao/sqlglot/commit/a482dc57359b8dc992395048f34b67e6a1355aa4) - Extract and compile generator *(PR [#7363](https://github.com/tobymao/sqlglot/pull/7363) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
74
|
+
|
|
75
|
+
Extract and compile generator (#7363)
|
|
76
|
+
|
|
77
|
+
- due to [`cb78bc3`](https://github.com/tobymao/sqlglot/commit/cb78bc3d5da6686e2608de5133cf1da416de9c67) - Extract and compile generator *(PR [#7365](https://github.com/tobymao/sqlglot/pull/7365) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
78
|
+
|
|
79
|
+
Extract and compile generator (#7365)
|
|
80
|
+
|
|
81
|
+
- due to [`adf0032`](https://github.com/tobymao/sqlglot/commit/adf00320d38a9904c8928bd33498fe4f79947150) - Extract and compile generator *(PR [#7366](https://github.com/tobymao/sqlglot/pull/7366) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
82
|
+
|
|
83
|
+
Extract and compile generator (#7366)
|
|
84
|
+
|
|
85
|
+
- due to [`7d26eed`](https://github.com/tobymao/sqlglot/commit/7d26eedbe3976be1b70d8b7b35173e1e65e40749) - Extract and compile generator *(PR [#7367](https://github.com/tobymao/sqlglot/pull/7367) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
86
|
+
|
|
87
|
+
Extract and compile generator (#7367)
|
|
88
|
+
|
|
89
|
+
- due to [`56e7a88`](https://github.com/tobymao/sqlglot/commit/56e7a886163e0281e231502dbe25ba253bd7c67e) - Extract and compile generator *(PR [#7370](https://github.com/tobymao/sqlglot/pull/7370) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
90
|
+
|
|
91
|
+
Extract and compile generator (#7370)
|
|
92
|
+
|
|
93
|
+
- due to [`2e8d3dd`](https://github.com/tobymao/sqlglot/commit/2e8d3dd3b94b38199516b66bc6809492767338c2) - Extract and compile generator *(PR [#7374](https://github.com/tobymao/sqlglot/pull/7374) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
94
|
+
|
|
95
|
+
Extract and compile generator (#7374)
|
|
96
|
+
|
|
97
|
+
- due to [`b1d5a06`](https://github.com/tobymao/sqlglot/commit/b1d5a06e274fcdd1f2cda00777c18bc659936b88) - Extract and compile generator *(PR [#7364](https://github.com/tobymao/sqlglot/pull/7364) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
98
|
+
|
|
99
|
+
Extract and compile generator (#7364)
|
|
100
|
+
|
|
101
|
+
- due to [`3ab4cf2`](https://github.com/tobymao/sqlglot/commit/3ab4cf270624ae13723b7cdcc2b92bf1fdcdb2ac) - Extract and compile generator *(PR [#7371](https://github.com/tobymao/sqlglot/pull/7371) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
102
|
+
|
|
103
|
+
Extract and compile generator (#7371)
|
|
104
|
+
|
|
105
|
+
- due to [`0a13068`](https://github.com/tobymao/sqlglot/commit/0a13068fc7f630785ec3516ebc8855955749d19e) - Extract and compile generator *(PR [#7376](https://github.com/tobymao/sqlglot/pull/7376) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
106
|
+
|
|
107
|
+
Extract and compile generator (#7376)
|
|
108
|
+
|
|
109
|
+
- due to [`09cc35d`](https://github.com/tobymao/sqlglot/commit/09cc35dcb7392865f60532c9ba389c64dcd3177a) - Extract and compile generator *(PR [#7373](https://github.com/tobymao/sqlglot/pull/7373) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
110
|
+
|
|
111
|
+
Extract and compile generator (#7373)
|
|
112
|
+
|
|
113
|
+
- due to [`d301233`](https://github.com/tobymao/sqlglot/commit/d3012336461b9b45953f5c7e04e07fa503e99cd2) - Extract and compile generator *(PR [#7372](https://github.com/tobymao/sqlglot/pull/7372) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
114
|
+
|
|
115
|
+
Extract and compile generator (#7372)
|
|
116
|
+
|
|
117
|
+
- due to [`d1b0d8f`](https://github.com/tobymao/sqlglot/commit/d1b0d8f5ab07116cbc0983ea94945a5b305577cd) - Fix [NOT] REGEXP / REGEXP_LIKE transpilation from Snowflake to DuckDB *(PR [#7354](https://github.com/tobymao/sqlglot/pull/7354) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
118
|
+
|
|
119
|
+
Fix [NOT] REGEXP / REGEXP_LIKE transpilation from Snowflake to DuckDB (#7354)
|
|
120
|
+
|
|
121
|
+
- due to [`53d56d4`](https://github.com/tobymao/sqlglot/commit/53d56d42e1dd3294cbf9f26c40e9c56991fba2f4) - Extract and compile generator *(PR [#7369](https://github.com/tobymao/sqlglot/pull/7369) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
122
|
+
|
|
123
|
+
Extract and compile generator (#7369)
|
|
124
|
+
|
|
125
|
+
- due to [`586e28e`](https://github.com/tobymao/sqlglot/commit/586e28ebdf020ab5f6ccaf6cb0202860f06ab48e) - Extract and compile generator *(PR [#7377](https://github.com/tobymao/sqlglot/pull/7377) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
126
|
+
|
|
127
|
+
Extract and compile generator (#7377)
|
|
128
|
+
|
|
129
|
+
- due to [`dcf01c1`](https://github.com/tobymao/sqlglot/commit/dcf01c17adb1c8231fee929c588eded0e71e3a5e) - Extract and compile generator *(PR [#7379](https://github.com/tobymao/sqlglot/pull/7379) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
130
|
+
|
|
131
|
+
Extract and compile generator (#7379)
|
|
132
|
+
|
|
133
|
+
- due to [`f7668a7`](https://github.com/tobymao/sqlglot/commit/f7668a77836d9af6a635b5f87b1ea43566d38978) - Extract and compile generator *(PR [#7368](https://github.com/tobymao/sqlglot/pull/7368) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
134
|
+
|
|
135
|
+
Extract and compile generator (#7368)
|
|
136
|
+
|
|
137
|
+
- due to [`21693d7`](https://github.com/tobymao/sqlglot/commit/21693d7476e3ddbcf73080d9885bcacb5383d52a) - refactor JSON extract *(PR [#7302](https://github.com/tobymao/sqlglot/pull/7302) by [@geooo109](https://github.com/geooo109))*:
|
|
138
|
+
|
|
139
|
+
refactor JSON extract (#7302)
|
|
140
|
+
|
|
141
|
+
- due to [`850bf1e`](https://github.com/tobymao/sqlglot/commit/850bf1e49a59c5950c0385772641fd0e89a3a4b8) - Extract and compile generator *(PR [#7375](https://github.com/tobymao/sqlglot/pull/7375) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
142
|
+
|
|
143
|
+
Extract and compile generator (#7375)
|
|
144
|
+
|
|
145
|
+
- due to [`1b14a79`](https://github.com/tobymao/sqlglot/commit/1b14a7971c63a44ec1e52e4356316a2db20dde43) - Extract and compile generator *(PR [#7381](https://github.com/tobymao/sqlglot/pull/7381) by [@VaggelisD](https://github.com/VaggelisD))*:
|
|
146
|
+
|
|
147
|
+
Extract and compile generator (#7381)
|
|
148
|
+
|
|
149
|
+
- due to [`fcc09dd`](https://github.com/tobymao/sqlglot/commit/fcc09ddcff0f1b1c785f826039fc6a0f2357589b) - Add transpilation support for ARRAY_UNIQUE_AGG function *(PR [#7386](https://github.com/tobymao/sqlglot/pull/7386) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
150
|
+
|
|
151
|
+
Add transpilation support for ARRAY_UNIQUE_AGG function (#7386)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### :sparkles: New Features
|
|
155
|
+
- [`4a077ca`](https://github.com/tobymao/sqlglot/commit/4a077ca4df1da0913928a7d635d21ea7a9b50ff0) - **duckdb**: Add transpilation support for neg position args for CHARINDEX *(PR [#7334](https://github.com/tobymao/sqlglot/pull/7334) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
156
|
+
- [`0921899`](https://github.com/tobymao/sqlglot/commit/0921899cb663b99b888b180dcb7f54750232f209) - **redshift**: support for TEXTLEN function *(PR [#7346](https://github.com/tobymao/sqlglot/pull/7346) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
|
|
157
|
+
- [`64f7e6c`](https://github.com/tobymao/sqlglot/commit/64f7e6c850fa850778fe033700eac9c31233a587) - **duckdb**: Add transpilation support for check_json function *(PR [#7353](https://github.com/tobymao/sqlglot/pull/7353) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
158
|
+
- [`4743e76`](https://github.com/tobymao/sqlglot/commit/4743e769eeb34db22a6734d01e8bc2f92b661cb3) - **optimizer**: annotate types for ORDER BY alias references *(PR [#7281](https://github.com/tobymao/sqlglot/pull/7281) by [@doripo](https://github.com/doripo))*
|
|
159
|
+
- [`d1b0d8f`](https://github.com/tobymao/sqlglot/commit/d1b0d8f5ab07116cbc0983ea94945a5b305577cd) - **duckdb**: Fix [NOT] REGEXP / REGEXP_LIKE transpilation from Snowflake to DuckDB *(PR [#7354](https://github.com/tobymao/sqlglot/pull/7354) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
160
|
+
- [`d5f74a6`](https://github.com/tobymao/sqlglot/commit/d5f74a6cb14c91687e8b2fbf26d3e792b7ea5d46) - **duckdb**: Add tests for NOT RLIKE to check the full match semantics *(PR [#7384](https://github.com/tobymao/sqlglot/pull/7384) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
161
|
+
- [`3a52141`](https://github.com/tobymao/sqlglot/commit/3a52141aaf9950bf1077e3757e868d3d5acd6f75) - **postgres**: handle non-literal interval values in datetime addition *(PR [#7360](https://github.com/tobymao/sqlglot/pull/7360) by [@georgesittas](https://github.com/georgesittas))*
|
|
162
|
+
- [`fcc09dd`](https://github.com/tobymao/sqlglot/commit/fcc09ddcff0f1b1c785f826039fc6a0f2357589b) - **duckdb**: Add transpilation support for ARRAY_UNIQUE_AGG function *(PR [#7386](https://github.com/tobymao/sqlglot/pull/7386) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
163
|
+
- [`263bb7f`](https://github.com/tobymao/sqlglot/commit/263bb7f1cd39b828ad91b85441e197c1625cda7e) - **duckdb**: do not issue CREATE unsupported iceberg property warning *(PR [#7396](https://github.com/tobymao/sqlglot/pull/7396) by [@treysp](https://github.com/treysp))*
|
|
164
|
+
- [`438f031`](https://github.com/tobymao/sqlglot/commit/438f03177ea37ed8765428767a6044110a100a62) - **duckdb**: support the full `SHOW TABLES` syntax spec *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
165
|
+
- [`7216cf9`](https://github.com/tobymao/sqlglot/commit/7216cf94c47ad0a71c5e840a4298748a1e2a4d95) - **snowflake**: support DROP ICEBERG TABLE *(PR [#7398](https://github.com/tobymao/sqlglot/pull/7398) by [@treysp](https://github.com/treysp))*
|
|
166
|
+
- [`b6ada45`](https://github.com/tobymao/sqlglot/commit/b6ada45b762943fce00e6744037ced1955961e4b) - **snowflake**: support ALTER ICEBERG TABLE *(PR [#7401](https://github.com/tobymao/sqlglot/pull/7401) by [@treysp](https://github.com/treysp))*
|
|
167
|
+
- [`877e184`](https://github.com/tobymao/sqlglot/commit/877e1842ba60740bf5053e03c48b4600d2e077b8) - **duckdb**: Add transpilation support for ILIKE ANY, LIKE ANY/ALL functions for ESCAPE pattern *(PR [#7394](https://github.com/tobymao/sqlglot/pull/7394) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
168
|
+
|
|
169
|
+
### :bug: Bug Fixes
|
|
170
|
+
- [`d257e76`](https://github.com/tobymao/sqlglot/commit/d257e76286c8b623c0f50b8d423c66261c23b267) - **clickhouse**: lowercase dateTrunc units for versions before 23.12 *(PR [#7331](https://github.com/tobymao/sqlglot/pull/7331) by [@markcheney1](https://github.com/markcheney1))*
|
|
171
|
+
- [`2cb9772`](https://github.com/tobymao/sqlglot/commit/2cb9772c420f8446a783ef95d5fdb2b94410fae7) - **optimizer**: enhance simplify_parens to handle additional parent types *(PR [#7339](https://github.com/tobymao/sqlglot/pull/7339) by [@MuSilk](https://github.com/MuSilk))*
|
|
172
|
+
- :arrow_lower_right: *fixes issue [#7338](https://github.com/tobymao/sqlglot/issues/7338) opened by [@MuSilk](https://github.com/MuSilk)*
|
|
173
|
+
- [`9973623`](https://github.com/tobymao/sqlglot/commit/9973623d0c0d824493611bd509c4dbf673cc7bd7) - **optimizer**: qualify column named END *(PR [#7345](https://github.com/tobymao/sqlglot/pull/7345) by [@geooo109](https://github.com/geooo109))*
|
|
174
|
+
- :arrow_lower_right: *fixes issue [#7344](https://github.com/tobymao/sqlglot/issues/7344) opened by [@michaelst](https://github.com/michaelst)*
|
|
175
|
+
- [`13e971d`](https://github.com/tobymao/sqlglot/commit/13e971d05e19ef06e931c4cf631181ed5e8effa0) - **clickhouse**: UUID property *(PR [#7349](https://github.com/tobymao/sqlglot/pull/7349) by [@geooo109](https://github.com/geooo109))*
|
|
176
|
+
- :arrow_lower_right: *fixes issue [#7348](https://github.com/tobymao/sqlglot/issues/7348) opened by [@ultram4rine](https://github.com/ultram4rine)*
|
|
177
|
+
- [`2a248f1`](https://github.com/tobymao/sqlglot/commit/2a248f1672a01c57917ccd383e1f26d9083ca1c6) - **optimizer**: fix correlated subquery *(PR [#7343](https://github.com/tobymao/sqlglot/pull/7343) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
178
|
+
- :arrow_lower_right: *fixes issue [#7308](https://github.com/tobymao/sqlglot/issues/7308) opened by [@adam-richardson-openai](https://github.com/adam-richardson-openai)*
|
|
179
|
+
- [`0624bbf`](https://github.com/tobymao/sqlglot/commit/0624bbfde3670956089a2e192e2462e31db54fa8) - **mysql**: Fix AttributeError crash when transpiling IGNORE/RESPECT NULLS *(PR [#7361](https://github.com/tobymao/sqlglot/pull/7361) by [@ShubhamKapoor992](https://github.com/ShubhamKapoor992))*
|
|
180
|
+
- :arrow_lower_right: *fixes issue [#7359](https://github.com/tobymao/sqlglot/issues/7359) opened by [@ShubhamKapoor992](https://github.com/ShubhamKapoor992)*
|
|
181
|
+
- [`0344937`](https://github.com/tobymao/sqlglot/commit/03449378d8e79017a88d92ffbbfd45c2924d115a) - handle pipe operator after subquery closes [#7388](https://github.com/tobymao/sqlglot/pull/7388) *(PR [#7391](https://github.com/tobymao/sqlglot/pull/7391) by [@georgesittas](https://github.com/georgesittas))*
|
|
182
|
+
- [`2b19bdc`](https://github.com/tobymao/sqlglot/commit/2b19bdca3e56d8046c7ce435dedfd943167c25fa) - **bigquery**: support parentheses for CAST FORMAT syntax *(PR [#7395](https://github.com/tobymao/sqlglot/pull/7395) by [@ShubhamKapoor992](https://github.com/ShubhamKapoor992))*
|
|
183
|
+
- :arrow_lower_right: *fixes issue [#7390](https://github.com/tobymao/sqlglot/issues/7390) opened by [@roykoand](https://github.com/roykoand)*
|
|
184
|
+
|
|
185
|
+
### :recycle: Refactors
|
|
186
|
+
- [`83e7851`](https://github.com/tobymao/sqlglot/commit/83e785140b75faa87bc375a85dc72b9b9d710563) - **generator**: Compile base Generator with mypyc *(PR [#7351](https://github.com/tobymao/sqlglot/pull/7351) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
187
|
+
- [`a424037`](https://github.com/tobymao/sqlglot/commit/a4240370d28c47ac7e2ef62ac5dda60720ba9870) - **tableau**: Extract and compile generator *(PR [#7362](https://github.com/tobymao/sqlglot/pull/7362) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
188
|
+
- [`a482dc5`](https://github.com/tobymao/sqlglot/commit/a482dc57359b8dc992395048f34b67e6a1355aa4) - **teradata**: Extract and compile generator *(PR [#7363](https://github.com/tobymao/sqlglot/pull/7363) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
189
|
+
- [`cb78bc3`](https://github.com/tobymao/sqlglot/commit/cb78bc3d5da6686e2608de5133cf1da416de9c67) - **druid**: Extract and compile generator *(PR [#7365](https://github.com/tobymao/sqlglot/pull/7365) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
190
|
+
- [`adf0032`](https://github.com/tobymao/sqlglot/commit/adf00320d38a9904c8928bd33498fe4f79947150) - **sqlite**: Extract and compile generator *(PR [#7366](https://github.com/tobymao/sqlglot/pull/7366) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
191
|
+
- [`7d26eed`](https://github.com/tobymao/sqlglot/commit/7d26eedbe3976be1b70d8b7b35173e1e65e40749) - **dremio**: Extract and compile generator *(PR [#7367](https://github.com/tobymao/sqlglot/pull/7367) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
192
|
+
- [`56e7a88`](https://github.com/tobymao/sqlglot/commit/56e7a886163e0281e231502dbe25ba253bd7c67e) - **snowflake**: Extract and compile generator *(PR [#7370](https://github.com/tobymao/sqlglot/pull/7370) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
193
|
+
- [`2e8d3dd`](https://github.com/tobymao/sqlglot/commit/2e8d3dd3b94b38199516b66bc6809492767338c2) - **hive**: Extract and compile generator *(PR [#7374](https://github.com/tobymao/sqlglot/pull/7374) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
194
|
+
- [`b1d5a06`](https://github.com/tobymao/sqlglot/commit/b1d5a06e274fcdd1f2cda00777c18bc659936b88) - **drill**: Extract and compile generator *(PR [#7364](https://github.com/tobymao/sqlglot/pull/7364) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
195
|
+
- [`3ab4cf2`](https://github.com/tobymao/sqlglot/commit/3ab4cf270624ae13723b7cdcc2b92bf1fdcdb2ac) - **oracle**: Extract and compile generator *(PR [#7371](https://github.com/tobymao/sqlglot/pull/7371) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
196
|
+
- [`0a13068`](https://github.com/tobymao/sqlglot/commit/0a13068fc7f630785ec3516ebc8855955749d19e) - **postgres**: Extract and compile generator *(PR [#7376](https://github.com/tobymao/sqlglot/pull/7376) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
197
|
+
- [`09cc35d`](https://github.com/tobymao/sqlglot/commit/09cc35dcb7392865f60532c9ba389c64dcd3177a) - **tsql**: Extract and compile generator *(PR [#7373](https://github.com/tobymao/sqlglot/pull/7373) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
198
|
+
- [`d301233`](https://github.com/tobymao/sqlglot/commit/d3012336461b9b45953f5c7e04e07fa503e99cd2) - **bigquery**: Extract and compile generator *(PR [#7372](https://github.com/tobymao/sqlglot/pull/7372) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
199
|
+
- [`53d56d4`](https://github.com/tobymao/sqlglot/commit/53d56d42e1dd3294cbf9f26c40e9c56991fba2f4) - **exasol**: Extract and compile generator *(PR [#7369](https://github.com/tobymao/sqlglot/pull/7369) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
200
|
+
- [`586e28e`](https://github.com/tobymao/sqlglot/commit/586e28ebdf020ab5f6ccaf6cb0202860f06ab48e) - **spark**: Extract and compile generator *(PR [#7377](https://github.com/tobymao/sqlglot/pull/7377) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
201
|
+
- [`dcf01c1`](https://github.com/tobymao/sqlglot/commit/dcf01c17adb1c8231fee929c588eded0e71e3a5e) - **presto**: Extract and compile generator *(PR [#7379](https://github.com/tobymao/sqlglot/pull/7379) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
202
|
+
- [`f7668a7`](https://github.com/tobymao/sqlglot/commit/f7668a77836d9af6a635b5f87b1ea43566d38978) - **clickhouse**: Extract and compile generator *(PR [#7368](https://github.com/tobymao/sqlglot/pull/7368) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
203
|
+
- [`850bf1e`](https://github.com/tobymao/sqlglot/commit/850bf1e49a59c5950c0385772641fd0e89a3a4b8) - **duckdb**: Extract and compile generator *(PR [#7375](https://github.com/tobymao/sqlglot/pull/7375) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
204
|
+
- [`1b14a79`](https://github.com/tobymao/sqlglot/commit/1b14a7971c63a44ec1e52e4356316a2db20dde43) - **mysql**: Extract and compile generator *(PR [#7381](https://github.com/tobymao/sqlglot/pull/7381) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
205
|
+
- [`3582aa5`](https://github.com/tobymao/sqlglot/commit/3582aa54226e20b6b6187e1f30ae183bba91f79d) - **generators**: Cleanup and fully compile all generators *(PR [#7389](https://github.com/tobymao/sqlglot/pull/7389) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
206
|
+
|
|
207
|
+
### :wrench: Chores
|
|
208
|
+
- [`4e9ed57`](https://github.com/tobymao/sqlglot/commit/4e9ed57cb59db648dace5d7e464899fa117eb273) - benchworkflow *(PR [#7340](https://github.com/tobymao/sqlglot/pull/7340) by [@tobymao](https://github.com/tobymao))*
|
|
209
|
+
- [`0fce391`](https://github.com/tobymao/sqlglot/commit/0fce3910a363a6006f9799c272865d17cc0275e1) - refactor duckdb strposition_sql *(commit by [@geooo109](https://github.com/geooo109))*
|
|
210
|
+
- [`f7bb6be`](https://github.com/tobymao/sqlglot/commit/f7bb6bea86c1629d03bf2807378d36de004cd4a7) - use collections.abc and built-in types for typing to avoid deprecation *(PR [#7329](https://github.com/tobymao/sqlglot/pull/7329) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
211
|
+
- [`f5e0a8a`](https://github.com/tobymao/sqlglot/commit/f5e0a8a450cdde59929209bdb74c9664dc6b3188) - always run sqlglot integration tests *(PR [#7350](https://github.com/tobymao/sqlglot/pull/7350) by [@georgesittas](https://github.com/georgesittas))*
|
|
212
|
+
- [`f0f04d9`](https://github.com/tobymao/sqlglot/commit/f0f04d92812e516b7074497e5bf4146cf7cd91e4) - Fix mypyc setup *(PR [#7382](https://github.com/tobymao/sqlglot/pull/7382) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
213
|
+
- [`47325ce`](https://github.com/tobymao/sqlglot/commit/47325ce7a5f31dc5c7173a6c91ad93666caa1b1b) - only trigger the benchmark job manually *(PR [#7383](https://github.com/tobymao/sqlglot/pull/7383) by [@georgesittas](https://github.com/georgesittas))*
|
|
214
|
+
- [`21693d7`](https://github.com/tobymao/sqlglot/commit/21693d7476e3ddbcf73080d9885bcacb5383d52a) - **parser**: refactor JSON extract *(PR [#7302](https://github.com/tobymao/sqlglot/pull/7302) by [@geooo109](https://github.com/geooo109))*
|
|
215
|
+
- [`c1842b2`](https://github.com/tobymao/sqlglot/commit/c1842b2388134782545e3d8c448b953b09abc553) - added annotations to all `**opts` arguments *(PR [#7342](https://github.com/tobymao/sqlglot/pull/7342) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
216
|
+
|
|
217
|
+
|
|
4
218
|
## [v30.0.3] - 2026-03-19
|
|
5
219
|
### :zap: Performance Improvements
|
|
6
220
|
- [`f87ebe0`](https://github.com/tobymao/sqlglot/commit/f87ebe02103b249ec5fa2c93e019e465f77630be) - use mypyc i64 for parser index fields (~1.6% faster) *(commit by [@tobymao](https://github.com/tobymao))*
|
|
@@ -13855,3 +14069,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
13855
14069
|
[v30.0.1]: https://github.com/tobymao/sqlglot/compare/v30.0.0...v30.0.1
|
|
13856
14070
|
[v30.0.2]: https://github.com/tobymao/sqlglot/compare/v30.0.1...v30.0.2
|
|
13857
14071
|
[v30.0.3]: https://github.com/tobymao/sqlglot/compare/v30.0.2...v30.0.3
|
|
14072
|
+
[v30.1.0]: https://github.com/tobymao/sqlglot/compare/v30.0.3...v30.1.0
|
|
14073
|
+
[v30.2.0]: https://github.com/tobymao/sqlglot/compare/v30.1.0...v30.2.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.PHONY: install install-dev install-devc install-devc-release install-pre-commit bench bench-parse bench-optimize test test-fast unit testc unitc style check docs docs-serve hidec showc clean resolve-integration-conflicts update-fixtures
|
|
1
|
+
.PHONY: install install-dev install-devc install-devc-release install-pre-commit bench bench-parse bench-transpile bench-optimize test test-fast unit testc unitc style check docs docs-serve hidec showc clean resolve-integration-conflicts update-fixtures
|
|
2
2
|
|
|
3
3
|
ifdef UV
|
|
4
4
|
PIP := uv pip
|
|
@@ -51,11 +51,14 @@ install-pre-commit:
|
|
|
51
51
|
@printf '#!/bin/bash\n.github/scripts/integration_tests_sync.sh post-commit\n' > .git/hooks/post-commit
|
|
52
52
|
@chmod +x .git/hooks/post-commit
|
|
53
53
|
|
|
54
|
-
bench: bench-parse bench-optimize
|
|
54
|
+
bench: bench-parse bench-transpile bench-optimize
|
|
55
55
|
|
|
56
56
|
bench-parse:
|
|
57
57
|
python -m benchmarks.parse
|
|
58
58
|
|
|
59
|
+
bench-transpile:
|
|
60
|
+
python -m benchmarks.parse --mode transpile
|
|
61
|
+
|
|
59
62
|
bench-optimize:
|
|
60
63
|
python -m benchmarks.optimize
|
|
61
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.1
|
|
3
|
+
Version: 30.2.1
|
|
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
|
|
@@ -33,10 +33,10 @@ Requires-Dist: types-pytz; extra == "dev"
|
|
|
33
33
|
Requires-Dist: typing_extensions; extra == "dev"
|
|
34
34
|
Requires-Dist: pyperf; extra == "dev"
|
|
35
35
|
Provides-Extra: c
|
|
36
|
-
Requires-Dist: sqlglotc==30.1
|
|
36
|
+
Requires-Dist: sqlglotc==30.2.1; extra == "c"
|
|
37
37
|
Provides-Extra: rs
|
|
38
38
|
Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
|
|
39
|
-
Requires-Dist: sqlglotc==30.1
|
|
39
|
+
Requires-Dist: sqlglotc==30.2.1; extra == "rs"
|
|
40
40
|
Dynamic: license-file
|
|
41
41
|
Dynamic: provides-extra
|
|
42
42
|
|
|
@@ -10,6 +10,7 @@ from __future__ import annotations
|
|
|
10
10
|
# bootstrap mypyc runtime: compiled .so modules do a top-level `import HASH__mypyc`,
|
|
11
11
|
# but the runtime .so lives inside sqlglot/. Pre-load it into sys.modules.
|
|
12
12
|
# this is only needed for editable builds
|
|
13
|
+
from collections.abc import Collection
|
|
13
14
|
import sys
|
|
14
15
|
from pathlib import Path
|
|
15
16
|
from builtins import type as Type
|
|
@@ -70,7 +71,8 @@ from sqlglot.schema import MappingSchema as MappingSchema, Schema as Schema
|
|
|
70
71
|
from sqlglot.tokens import Token as Token, Tokenizer as Tokenizer, TokenType as TokenType
|
|
71
72
|
|
|
72
73
|
if t.TYPE_CHECKING:
|
|
73
|
-
from sqlglot._typing import E
|
|
74
|
+
from sqlglot._typing import E, GeneratorArgs, ParserNoDialectArgs
|
|
75
|
+
from typing_extensions import Unpack
|
|
74
76
|
from sqlglot.dialects.dialect import DialectType as DialectType
|
|
75
77
|
|
|
76
78
|
logger = logging.getLogger("sqlglot")
|
|
@@ -88,7 +90,7 @@ pretty = False
|
|
|
88
90
|
"""Whether to format generated SQL by default."""
|
|
89
91
|
|
|
90
92
|
|
|
91
|
-
def tokenize(sql: str, read: DialectType = None, dialect: DialectType = None) ->
|
|
93
|
+
def tokenize(sql: str, read: DialectType = None, dialect: DialectType = None) -> list[Token]:
|
|
92
94
|
"""
|
|
93
95
|
Tokenizes the given SQL string.
|
|
94
96
|
|
|
@@ -104,7 +106,10 @@ def tokenize(sql: str, read: DialectType = None, dialect: DialectType = None) ->
|
|
|
104
106
|
|
|
105
107
|
|
|
106
108
|
def parse(
|
|
107
|
-
sql: str,
|
|
109
|
+
sql: str,
|
|
110
|
+
read: DialectType = None,
|
|
111
|
+
dialect: DialectType = None,
|
|
112
|
+
**opts: Unpack[ParserNoDialectArgs],
|
|
108
113
|
) -> list[t.Optional[Expr]]:
|
|
109
114
|
"""
|
|
110
115
|
Parses the given SQL string into a collection of syntax trees, one per parsed SQL statement.
|
|
@@ -122,11 +127,24 @@ def parse(
|
|
|
122
127
|
|
|
123
128
|
|
|
124
129
|
@t.overload
|
|
125
|
-
def parse_one(
|
|
130
|
+
def parse_one(
|
|
131
|
+
sql: str,
|
|
132
|
+
*,
|
|
133
|
+
read: DialectType = ...,
|
|
134
|
+
dialect: DialectType = ...,
|
|
135
|
+
into: Type[E],
|
|
136
|
+
**opts: Unpack[ParserNoDialectArgs],
|
|
137
|
+
) -> E: ...
|
|
126
138
|
|
|
127
139
|
|
|
128
140
|
@t.overload
|
|
129
|
-
def parse_one(
|
|
141
|
+
def parse_one(
|
|
142
|
+
sql: str,
|
|
143
|
+
read: DialectType = ...,
|
|
144
|
+
dialect: DialectType = ...,
|
|
145
|
+
into: t.Optional[exp.IntoType] = ...,
|
|
146
|
+
**opts: Unpack[ParserNoDialectArgs],
|
|
147
|
+
) -> Expr: ...
|
|
130
148
|
|
|
131
149
|
|
|
132
150
|
def parse_one(
|
|
@@ -134,7 +152,7 @@ def parse_one(
|
|
|
134
152
|
read: DialectType = None,
|
|
135
153
|
dialect: DialectType = None,
|
|
136
154
|
into: t.Optional[exp.IntoType] = None,
|
|
137
|
-
**opts:
|
|
155
|
+
**opts: Unpack[ParserNoDialectArgs],
|
|
138
156
|
) -> Expr:
|
|
139
157
|
"""
|
|
140
158
|
Parses the given SQL string and returns a syntax tree.
|
|
@@ -169,8 +187,8 @@ def transpile(
|
|
|
169
187
|
write: DialectType = None,
|
|
170
188
|
identity: bool = True,
|
|
171
189
|
error_level: t.Optional[ErrorLevel] = None,
|
|
172
|
-
**opts:
|
|
173
|
-
) ->
|
|
190
|
+
**opts: Unpack[GeneratorArgs],
|
|
191
|
+
) -> list[str]:
|
|
174
192
|
"""
|
|
175
193
|
Parses the given SQL string in accordance with the source dialect and returns a list of SQL strings transformed
|
|
176
194
|
to conform to the target dialect. Each string in the returned list represents a single transformed SQL statement.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import typing as t
|
|
4
|
+
|
|
5
|
+
if t.TYPE_CHECKING:
|
|
6
|
+
from collections.abc import Mapping
|
|
7
|
+
import sqlglot
|
|
8
|
+
from sqlglot.dialects.dialect import DialectType
|
|
9
|
+
from sqlglot.errors import ErrorLevel
|
|
10
|
+
|
|
11
|
+
B = t.TypeVar("B", bound="sqlglot.exp.Binary")
|
|
12
|
+
E = t.TypeVar("E", bound="sqlglot.exp.Expr")
|
|
13
|
+
F = t.TypeVar("F", bound="sqlglot.exp.Func")
|
|
14
|
+
T = t.TypeVar("T")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class _DialectArg(t.TypedDict, total=False):
|
|
18
|
+
dialect: DialectType
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ParserNoDialectArgs(t.TypedDict, total=False):
|
|
22
|
+
error_level: t.Optional[ErrorLevel]
|
|
23
|
+
error_message_context: int
|
|
24
|
+
max_errors: int
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ParserArgs(ParserNoDialectArgs, _DialectArg, total=False):
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class GeneratorNoDialectArgs(t.TypedDict, total=False):
|
|
32
|
+
pretty: t.Optional[t.Union[bool, int]]
|
|
33
|
+
identify: t.Union[str, bool]
|
|
34
|
+
normalize: bool
|
|
35
|
+
pad: int
|
|
36
|
+
indent: int
|
|
37
|
+
normalize_functions: t.Optional[t.Union[str, bool]]
|
|
38
|
+
unsupported_level: ErrorLevel
|
|
39
|
+
max_unsupported: int
|
|
40
|
+
leading_comma: bool
|
|
41
|
+
max_text_width: int
|
|
42
|
+
comments: bool
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class GeneratorArgs(GeneratorNoDialectArgs, _DialectArg, total=False):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class GraphHTMLArgs(t.TypedDict, total=False):
|
|
50
|
+
imports: bool
|
|
51
|
+
options: t.Optional[Mapping[str, object]]
|
|
@@ -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.1
|
|
22
|
-
__version_tuple__ = version_tuple = (30,
|
|
21
|
+
__version__ = version = '30.2.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 2, 1)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g6983aedac'
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import typing as t
|
|
4
3
|
|
|
5
|
-
from sqlglot import
|
|
6
|
-
from sqlglot.dialects import Dialect,
|
|
4
|
+
from sqlglot import tokens
|
|
5
|
+
from sqlglot.dialects.dialect import Dialect, DialectType
|
|
7
6
|
from sqlglot.generators.athena import AthenaGenerator
|
|
8
7
|
from sqlglot.parsers.athena import AthenaParser
|
|
9
8
|
from sqlglot.tokens import TokenType, Token
|
|
9
|
+
from sqlglot.dialects.trino import Trino
|
|
10
|
+
from sqlglot.dialects.hive import Hive
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class Athena(Dialect):
|
|
@@ -47,34 +48,6 @@ class Athena(Dialect):
|
|
|
47
48
|
- https://docs.aws.amazon.com/athena/latest/ug/dml-queries-functions-operators.html
|
|
48
49
|
"""
|
|
49
50
|
|
|
50
|
-
def __init__(self, **kwargs):
|
|
51
|
-
super().__init__(**kwargs)
|
|
52
|
-
|
|
53
|
-
self._hive = Hive(**kwargs)
|
|
54
|
-
self._trino = Trino(**kwargs)
|
|
55
|
-
|
|
56
|
-
def tokenize(self, sql: str, **opts: object) -> list[Token]:
|
|
57
|
-
opts["hive"] = self._hive
|
|
58
|
-
opts["trino"] = self._trino
|
|
59
|
-
return super().tokenize(sql, **opts)
|
|
60
|
-
|
|
61
|
-
def parse(self, sql: str, **opts: object) -> list[t.Optional[exp.Expr]]:
|
|
62
|
-
opts["hive"] = self._hive
|
|
63
|
-
opts["trino"] = self._trino
|
|
64
|
-
return super().parse(sql, **opts)
|
|
65
|
-
|
|
66
|
-
def parse_into(
|
|
67
|
-
self, expression_type: exp.IntoType, sql: str, **opts: object
|
|
68
|
-
) -> list[t.Optional[exp.Expr]]:
|
|
69
|
-
opts["hive"] = self._hive
|
|
70
|
-
opts["trino"] = self._trino
|
|
71
|
-
return super().parse_into(expression_type, sql, **opts)
|
|
72
|
-
|
|
73
|
-
def generate(self, expression: exp.Expr, copy: bool = True, **opts: object) -> str:
|
|
74
|
-
opts["hive"] = self._hive
|
|
75
|
-
opts["trino"] = self._trino
|
|
76
|
-
return super().generate(expression, copy=copy, **opts)
|
|
77
|
-
|
|
78
51
|
# This Tokenizer consumes a combination of HiveQL and Trino SQL and then processes the tokens
|
|
79
52
|
# to disambiguate which dialect needs to be actually used in order to tokenize correctly.
|
|
80
53
|
class Tokenizer(tokens.Tokenizer):
|
|
@@ -94,16 +67,13 @@ class Athena(Dialect):
|
|
|
94
67
|
"UNLOAD": TokenType.COMMAND,
|
|
95
68
|
}
|
|
96
69
|
|
|
97
|
-
def __init__(self,
|
|
98
|
-
|
|
99
|
-
trino = kwargs.pop("trino", None) or Trino()
|
|
100
|
-
|
|
101
|
-
super().__init__(*args, **kwargs)
|
|
70
|
+
def __init__(self, dialect: DialectType = None) -> None:
|
|
71
|
+
super().__init__(dialect=dialect)
|
|
102
72
|
|
|
103
|
-
self._hive_tokenizer =
|
|
104
|
-
self._trino_tokenizer = _TrinoTokenizer(
|
|
73
|
+
self._hive_tokenizer = Hive().tokenizer()
|
|
74
|
+
self._trino_tokenizer = _TrinoTokenizer(Trino())
|
|
105
75
|
|
|
106
|
-
def tokenize(self, sql: str) ->
|
|
76
|
+
def tokenize(self, sql: str) -> list[Token]:
|
|
107
77
|
tokens = super().tokenize(sql)
|
|
108
78
|
|
|
109
79
|
if _tokenize_as_hive(tokens):
|
|
@@ -116,7 +86,7 @@ class Athena(Dialect):
|
|
|
116
86
|
Generator = AthenaGenerator
|
|
117
87
|
|
|
118
88
|
|
|
119
|
-
def _tokenize_as_hive(tokens:
|
|
89
|
+
def _tokenize_as_hive(tokens: list[Token]) -> bool:
|
|
120
90
|
if len(tokens) < 2:
|
|
121
91
|
return False
|
|
122
92
|
|
|
@@ -39,6 +39,7 @@ class BigQuery(Dialect):
|
|
|
39
39
|
EXCLUDES_PSEUDOCOLUMNS_FROM_STAR = True
|
|
40
40
|
QUERY_RESULTS_ARE_STRUCTS = True
|
|
41
41
|
JSON_EXTRACT_SCALAR_SCALAR_ONLY = True
|
|
42
|
+
JSON_PATH_SINGLE_DOT_IS_WILDCARD = True
|
|
42
43
|
LEAST_GREATEST_IGNORES_NULLS = False
|
|
43
44
|
DEFAULT_NULL_TYPE = exp.DType.BIGINT
|
|
44
45
|
PRIORITIZE_NON_LITERAL_TYPES = True
|
|
@@ -151,6 +152,7 @@ class BigQuery(Dialect):
|
|
|
151
152
|
VAR_TOKENS = {
|
|
152
153
|
*jsonpath.JSONPathTokenizer.VAR_TOKENS,
|
|
153
154
|
TokenType.DASH,
|
|
155
|
+
TokenType.NUMBER,
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
class Tokenizer(tokens.Tokenizer):
|