sqlglot 30.6.0__tar.gz → 30.8.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.6.0 → sqlglot-30.8.0}/CHANGELOG.md +137 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/Makefile +19 -3
- {sqlglot-30.6.0/sqlglot.egg-info → sqlglot-30.8.0}/PKG-INFO +5 -4
- sqlglot-30.8.0/setup.py +34 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/__init__.py +1 -17
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/dialect.py +27 -18
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/dremio.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/drill.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/duckdb.py +2 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/hive.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/postgres.py +2 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/presto.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/redshift.py +9 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/snowflake.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/trino.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/tsql.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/array.py +6 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/core.py +303 -303
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/datatypes.py +41 -21
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/ddl.py +8 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/functions.py +8 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/json.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/query.py +74 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/string.py +1 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generator.py +106 -8
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/bigquery.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/clickhouse.py +4 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/duckdb.py +101 -12
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/exasol.py +46 -18
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/hive.py +5 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/mysql.py +2 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/oracle.py +2 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/postgres.py +3 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/presto.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/redshift.py +38 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/singlestore.py +7 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/snowflake.py +7 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/spark.py +8 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/tsql.py +1 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/lineage.py +119 -31
- sqlglot-30.8.0/sqlglot/optimizer/__init__.py +65 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/annotate_types.py +162 -25
- sqlglot-30.8.0/sqlglot/optimizer/canonicalize_internal_names.py +302 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/eliminate_joins.py +30 -29
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/eliminate_subqueries.py +7 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/normalize.py +14 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/optimize_joins.py +9 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/pushdown_predicates.py +46 -19
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/pushdown_projections.py +1 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/qualify.py +3 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/qualify_columns.py +11 -46
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/qualify_tables.py +6 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/resolver.py +49 -29
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/scope.py +16 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/unnest_subqueries.py +5 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parser.py +156 -46
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/bigquery.py +15 -14
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/clickhouse.py +12 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/databricks.py +1 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/dremio.py +2 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/drill.py +1 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/duckdb.py +10 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/exasol.py +7 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/hive.py +37 -17
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/mysql.py +52 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/oracle.py +6 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/postgres.py +7 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/presto.py +8 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/prql.py +2 -2
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/redshift.py +36 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/singlestore.py +3 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/snowflake.py +13 -7
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/spark2.py +3 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/planner.py +36 -43
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/schema.py +20 -14
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/serde.py +10 -6
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/time.py +6 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/tokenizer_core.py +10 -8
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/tokens.py +24 -6
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/transforms.py +68 -57
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/__init__.py +6 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/bigquery.py +4 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/clickhouse.py +5 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/hive.py +4 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/snowflake.py +13 -8
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/spark.py +4 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0/sqlglot.egg-info}/PKG-INFO +5 -4
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot.egg-info/SOURCES.txt +3 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot.egg-info/requires.txt +12 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglotc/pyproject.toml +9 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglotc/setup.py +5 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_bigquery.py +20 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_clickhouse.py +8 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_databricks.py +11 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_dialect.py +30 -15
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_duckdb.py +39 -5
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_exasol.py +71 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_hive.py +1 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_mysql.py +57 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_oracle.py +14 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_postgres.py +53 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_presto.py +3 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_redshift.py +13 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_snowflake.py +23 -8
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_spark.py +33 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_sqlite.py +2 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/annotate_functions.sql +69 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/annotate_types.sql +12 -0
- sqlglot-30.8.0/tests/fixtures/optimizer/canonicalize_internal_names.sql +251 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/pushdown_projections.sql +27 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/qualify_columns.sql +1 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/qualify_tables.sql +6 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +2 -2
- sqlglot-30.8.0/tests/leakcheck.py +365 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_expressions.py +0 -1
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_lineage.py +201 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_optimizer.py +349 -3
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_parser.py +29 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_transpile.py +6 -1
- sqlglot-30.6.0/setup.py +0 -29
- sqlglot-30.6.0/sqlglot/optimizer/__init__.py +0 -11
- {sqlglot-30.6.0 → sqlglot-30.8.0}/.gitignore +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/.gitmodules +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/.gitpod.yml +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/AGENTS.md +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/CLAUDE.md +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/LICENSE +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/MANIFEST.in +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/README.md +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/pyproject.toml +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/setup.cfg +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/clickhouse.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/expressions/temporal.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/databricks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/spark2.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/sqlite.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/generators/trino.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/merge_subqueries.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/optimizer/simplify.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/duckdb.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglot.png +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/dialects/test_tsql.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/merge_subqueries.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/optimizer.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/pushdown_predicates.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/simplify.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/helpers.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_build.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_diff.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_docs.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_errors.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_executor.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_generator.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_helper.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_schema.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_serde.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_time.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.6.0 → sqlglot-30.8.0}/tests/test_transforms.py +0 -0
|
@@ -1,6 +1,141 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.7.0] - 2026-05-04
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`68861d9`](https://github.com/tobymao/sqlglot/commit/68861d9f3aaa6c9ae405dacfa22117fb64a1d803) - support `DROP PRIMARY KEY`. *(PR [#7530](https://github.com/tobymao/sqlglot/pull/7530) by [@burnison](https://github.com/burnison))*:
|
|
7
|
+
|
|
8
|
+
support `DROP PRIMARY KEY`. (#7530)
|
|
9
|
+
|
|
10
|
+
- due to [`8669e55`](https://github.com/tobymao/sqlglot/commit/8669e55f385eb759bbf5ea1ec095e63ec48cfa91) - mark DECOMPRESS_STRING as unsupported [CLAUDE] *(PR [#7545](https://github.com/tobymao/sqlglot/pull/7545) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
|
|
11
|
+
|
|
12
|
+
mark DECOMPRESS_STRING as unsupported [CLAUDE] (#7545)
|
|
13
|
+
|
|
14
|
+
- due to [`b334dcc`](https://github.com/tobymao/sqlglot/commit/b334dccb7f94993e71fa4f0e59d984a3f0d351d0) - mark DECOMPRESS_BINARY as unsupported *(PR [#7546](https://github.com/tobymao/sqlglot/pull/7546) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
|
|
15
|
+
|
|
16
|
+
mark DECOMPRESS_BINARY as unsupported (#7546)
|
|
17
|
+
|
|
18
|
+
- due to [`8f572f8`](https://github.com/tobymao/sqlglot/commit/8f572f8656c9a5a5e45ac25607af6204bca58773) - qualify UNPIVOT on CTE sources *(PR [#7550](https://github.com/tobymao/sqlglot/pull/7550) by [@georgesittas](https://github.com/georgesittas))*:
|
|
19
|
+
|
|
20
|
+
qualify UNPIVOT on CTE sources (#7550)
|
|
21
|
+
|
|
22
|
+
- due to [`b4dea8c`](https://github.com/tobymao/sqlglot/commit/b4dea8c7e4c9e598e33efc56f007a0ab6dab9b5d) - Transpilation support for UUID_STRING *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
|
|
23
|
+
|
|
24
|
+
Transpilation support for UUID_STRING
|
|
25
|
+
|
|
26
|
+
- due to [`e883b0b`](https://github.com/tobymao/sqlglot/commit/e883b0b39ebdeeab408743786f66d62dd92b3267) - map duckdb `LIST` to `ArrayAgg` *(PR [#7552](https://github.com/tobymao/sqlglot/pull/7552) by [@georgesittas](https://github.com/georgesittas))*:
|
|
27
|
+
|
|
28
|
+
map duckdb `LIST` to `ArrayAgg` (#7552)
|
|
29
|
+
|
|
30
|
+
- due to [`ded89c2`](https://github.com/tobymao/sqlglot/commit/ded89c2e8edc6eee14f9fabb3d6fd036cced284a) - Add transpilation support for STRTOK_TO_ARRAY function *(PR [#7536](https://github.com/tobymao/sqlglot/pull/7536) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
|
|
31
|
+
|
|
32
|
+
Add transpilation support for STRTOK_TO_ARRAY function (#7536)
|
|
33
|
+
|
|
34
|
+
- due to [`f743755`](https://github.com/tobymao/sqlglot/commit/f743755e7b9ad45839c9c6f651d199bd5441b661) - register NAMED_STRUCT in parser so struct fields annotate CLAUDE *(PR [#7561](https://github.com/tobymao/sqlglot/pull/7561) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*:
|
|
35
|
+
|
|
36
|
+
register NAMED_STRUCT in parser so struct fields annotate CLAUDE (#7561)
|
|
37
|
+
|
|
38
|
+
- due to [`4cca3a0`](https://github.com/tobymao/sqlglot/commit/4cca3a017955f310b83988e36be31337859ba9fa) - support arbitrarily many args in JSONArray [CLAUDE] *(PR [#7559](https://github.com/tobymao/sqlglot/pull/7559) by [@maxa-jonathan-hallee](https://github.com/maxa-jonathan-hallee))*:
|
|
39
|
+
|
|
40
|
+
support arbitrarily many args in JSONArray [CLAUDE] (#7559)
|
|
41
|
+
|
|
42
|
+
- due to [`206e2f8`](https://github.com/tobymao/sqlglot/commit/206e2f8926458162ceb124bba651b07e14d43bc0) - full `MODIFY COLUMN` support. *(PR [#7562](https://github.com/tobymao/sqlglot/pull/7562) by [@burnison](https://github.com/burnison))*:
|
|
43
|
+
|
|
44
|
+
full `MODIFY COLUMN` support. (#7562)
|
|
45
|
+
|
|
46
|
+
- due to [`fd48100`](https://github.com/tobymao/sqlglot/commit/fd4810018e2ea602e1c59994ebe517b1c06d7f49) - generate "SUBSTR" instead of "SUBSTRING" for Substr expr *(PR [#7583](https://github.com/tobymao/sqlglot/pull/7583) by [@georgesittas](https://github.com/georgesittas))*:
|
|
47
|
+
|
|
48
|
+
generate "SUBSTR" instead of "SUBSTRING" for Substr expr (#7583)
|
|
49
|
+
|
|
50
|
+
- due to [`17432c6`](https://github.com/tobymao/sqlglot/commit/17432c61175194ee0f56f0703393e8c5fdc9e81f) - do not indent newlines within identifiers in pretty mode fixes [#7953](https://github.com/tobymao/sqlglot/pull/7953) *(commit by [@georgesittas](https://github.com/georgesittas))*:
|
|
51
|
+
|
|
52
|
+
do not indent newlines within identifiers in pretty mode fixes #7953
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### :sparkles: New Features
|
|
56
|
+
- [`cf1c9b7`](https://github.com/tobymao/sqlglot/commit/cf1c9b7c9d6fe5f4b6919e7599182869426f527a) - **tests**: add leakcheck harness for sqlglot[c] *(PR [#7533](https://github.com/tobymao/sqlglot/pull/7533) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
57
|
+
- [`68861d9`](https://github.com/tobymao/sqlglot/commit/68861d9f3aaa6c9ae405dacfa22117fb64a1d803) - **mysql**: support `DROP PRIMARY KEY`. *(PR [#7530](https://github.com/tobymao/sqlglot/pull/7530) by [@burnison](https://github.com/burnison))*
|
|
58
|
+
- [`8669e55`](https://github.com/tobymao/sqlglot/commit/8669e55f385eb759bbf5ea1ec095e63ec48cfa91) - **duckdb**: mark DECOMPRESS_STRING as unsupported [CLAUDE] *(PR [#7545](https://github.com/tobymao/sqlglot/pull/7545) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
59
|
+
- [`b334dcc`](https://github.com/tobymao/sqlglot/commit/b334dccb7f94993e71fa4f0e59d984a3f0d351d0) - **duckdb**: mark DECOMPRESS_BINARY as unsupported *(PR [#7546](https://github.com/tobymao/sqlglot/pull/7546) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
60
|
+
- [`234198a`](https://github.com/tobymao/sqlglot/commit/234198a311c56085b58f72f2871ec42103ff9a19) - **exasol**: transpile USE/OPEN SCHEMA and SHOW TABLES to system-table query *(PR [#7538](https://github.com/tobymao/sqlglot/pull/7538) by [@mkcorneli](https://github.com/mkcorneli))*
|
|
61
|
+
- [`e3fee4d`](https://github.com/tobymao/sqlglot/commit/e3fee4d2dc33b770622831490d2980a837718475) - **snowflake**: transpile DuckDB list() and list_distinct() [CLAUDE] *(PR [#7551](https://github.com/tobymao/sqlglot/pull/7551) by [@maxa-jonathan-hallee](https://github.com/maxa-jonathan-hallee))*
|
|
62
|
+
- [`92aea6b`](https://github.com/tobymao/sqlglot/commit/92aea6bb80902cd1381f5a01dc75fd71c6071296) - **duckdb**: Add UUID v5 unsupported error for Snowflake UUID_STRING transpilation *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
63
|
+
- [`b4dea8c`](https://github.com/tobymao/sqlglot/commit/b4dea8c7e4c9e598e33efc56f007a0ab6dab9b5d) - **snowflake**: Transpilation support for UUID_STRING *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
64
|
+
- [`b828e30`](https://github.com/tobymao/sqlglot/commit/b828e304485fcf9d8696dc7fcf503ccbc78ade99) - **snowflake**: add UUID_IS_STRING_TYPE flag and UUID_STRING parser *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
65
|
+
- [`ded89c2`](https://github.com/tobymao/sqlglot/commit/ded89c2e8edc6eee14f9fabb3d6fd036cced284a) - **duckdb**: Add transpilation support for STRTOK_TO_ARRAY function *(PR [#7536](https://github.com/tobymao/sqlglot/pull/7536) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
66
|
+
- [`f743755`](https://github.com/tobymao/sqlglot/commit/f743755e7b9ad45839c9c6f651d199bd5441b661) - **hive**: register NAMED_STRUCT in parser so struct fields annotate CLAUDE *(PR [#7561](https://github.com/tobymao/sqlglot/pull/7561) by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
67
|
+
- [`4cca3a0`](https://github.com/tobymao/sqlglot/commit/4cca3a017955f310b83988e36be31337859ba9fa) - **duckdb**: support arbitrarily many args in JSONArray [CLAUDE] *(PR [#7559](https://github.com/tobymao/sqlglot/pull/7559) by [@maxa-jonathan-hallee](https://github.com/maxa-jonathan-hallee))*
|
|
68
|
+
- [`3bc8f38`](https://github.com/tobymao/sqlglot/commit/3bc8f3846871d630338fb75761117151cbd9162b) - **oracle**: support `LISTAGG(... ON OVERFLOW ...)` *(PR [#7565](https://github.com/tobymao/sqlglot/pull/7565) by [@galunto](https://github.com/galunto))*
|
|
69
|
+
- [`1a10806`](https://github.com/tobymao/sqlglot/commit/1a10806505db181737065898458fdc669e4a7ce5) - **mypyc**: Enable incremental compilation, deprecate Python 3.9 *(PR [#7574](https://github.com/tobymao/sqlglot/pull/7574) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
70
|
+
- [`d146dcd`](https://github.com/tobymao/sqlglot/commit/d146dcd6efab5f77c2eb1801b1eb882052c2f273) - **lineage**: support all-columns mode and on_node callback *(PR [#7575](https://github.com/tobymao/sqlglot/pull/7575) by [@georgesittas](https://github.com/georgesittas))*
|
|
71
|
+
- [`25552ee`](https://github.com/tobymao/sqlglot/commit/25552eea658e3931a420fca35e186573ac66927b) - **optimizer**: canonicalize internal query names *(PR [#7580](https://github.com/tobymao/sqlglot/pull/7580) by [@georgesittas](https://github.com/georgesittas))*
|
|
72
|
+
- [`fab6ccf`](https://github.com/tobymao/sqlglot/commit/fab6ccf6ec525bc4d78c185068493e26d5e941df) - **duckdb**: Add transpilation support for HEX_ENCODE function *(PR [#7591](https://github.com/tobymao/sqlglot/pull/7591) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
73
|
+
|
|
74
|
+
### :bug: Bug Fixes
|
|
75
|
+
- [`8583c2d`](https://github.com/tobymao/sqlglot/commit/8583c2dc2b0b29089faf4376f0782e9db2ea5f27) - correctly handle follow-tokens for unit-less intervals *(PR [#7529](https://github.com/tobymao/sqlglot/pull/7529) by [@jvstein](https://github.com/jvstein))*
|
|
76
|
+
- [`daca12a`](https://github.com/tobymao/sqlglot/commit/daca12a51564199b71a3947dd77e5c5be0c3d60d) - **mysql**: accept quoted charset in `USING`. *(PR [#7522](https://github.com/tobymao/sqlglot/pull/7522) by [@burnison](https://github.com/burnison))*
|
|
77
|
+
- [`6053db6`](https://github.com/tobymao/sqlglot/commit/6053db6a98ceecce937f731ad2cdb560ddd8bcda) - **optimizer**: robust scope for UDTF *(PR [#7535](https://github.com/tobymao/sqlglot/pull/7535) by [@geooo109](https://github.com/geooo109))*
|
|
78
|
+
- [`a88dfce`](https://github.com/tobymao/sqlglot/commit/a88dfce091a0fc61c1a8efbd1b35616f22b387ff) - **mysql**: support SHOW TABLES IN <schema> parsing *(PR [#7537](https://github.com/tobymao/sqlglot/pull/7537) by [@mkcorneli](https://github.com/mkcorneli))*
|
|
79
|
+
- [`0bd0c46`](https://github.com/tobymao/sqlglot/commit/0bd0c46505636355926a84158d4d2f60145f0faf) - **optimizer**: handle ColumnDef in typed table alias columns *(PR [#7542](https://github.com/tobymao/sqlglot/pull/7542) by [@tobymao](https://github.com/tobymao))*
|
|
80
|
+
- [`f387112`](https://github.com/tobymao/sqlglot/commit/f3871121d5f61e3c12dd47cfa700c4452f4fd807) - **parser**: robust CONCAT_WS *(PR [#7544](https://github.com/tobymao/sqlglot/pull/7544) by [@geooo109](https://github.com/geooo109))*
|
|
81
|
+
- :arrow_lower_right: *fixes issue [#7540](https://github.com/tobymao/sqlglot/issues/7540) opened by [@nickhand](https://github.com/nickhand)*
|
|
82
|
+
- [`5351ca1`](https://github.com/tobymao/sqlglot/commit/5351ca128bc48caeb557996ab577d2e89775200f) - **optimizer**: EXPLODE qualify and annotate *(PR [#7549](https://github.com/tobymao/sqlglot/pull/7549) by [@geooo109](https://github.com/geooo109))*
|
|
83
|
+
- :arrow_lower_right: *fixes issue [#7541](https://github.com/tobymao/sqlglot/issues/7541) opened by [@catlynkong](https://github.com/catlynkong)*
|
|
84
|
+
- [`8f572f8`](https://github.com/tobymao/sqlglot/commit/8f572f8656c9a5a5e45ac25607af6204bca58773) - **optimizer**: qualify UNPIVOT on CTE sources *(PR [#7550](https://github.com/tobymao/sqlglot/pull/7550) by [@georgesittas](https://github.com/georgesittas))*
|
|
85
|
+
- [`cf0ffd9`](https://github.com/tobymao/sqlglot/commit/cf0ffd99ef27a4a4764104feb9b1dd2af1c544ce) - **optimizer**: qualify (UN)PIVOT on CTE sources *(PR [#7560](https://github.com/tobymao/sqlglot/pull/7560) by [@georgesittas](https://github.com/georgesittas))*
|
|
86
|
+
- [`2c1a90c`](https://github.com/tobymao/sqlglot/commit/2c1a90ccf82cb8d3c43703bc9698e3872a4166e9) - **clickhouse**: apply version-aware unit lowercase to DateTrunc [CLAUDE] *(PR [#7564](https://github.com/tobymao/sqlglot/pull/7564) by [@markcheney1](https://github.com/markcheney1))*
|
|
87
|
+
- [`206e2f8`](https://github.com/tobymao/sqlglot/commit/206e2f8926458162ceb124bba651b07e14d43bc0) - **mysql**: full `MODIFY COLUMN` support. *(PR [#7562](https://github.com/tobymao/sqlglot/pull/7562) by [@burnison](https://github.com/burnison))*
|
|
88
|
+
- [`6110de6`](https://github.com/tobymao/sqlglot/commit/6110de6b24a2ab37b031d46e319a22c0db6ed27d) - **lineage**: avoid self-loops from cached non-owned upstream nodes *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
89
|
+
- [`e078e5d`](https://github.com/tobymao/sqlglot/commit/e078e5db72a7ee5fd6011e1e21285e4692befdbd) - **postgres**: TRIM with UNNEST and ORDINALITY *(PR [#7573](https://github.com/tobymao/sqlglot/pull/7573) by [@geooo109](https://github.com/geooo109))*
|
|
90
|
+
- :arrow_lower_right: *fixes issue [#7566](https://github.com/tobymao/sqlglot/issues/7566) opened by [@CPAPI-104](https://github.com/CPAPI-104)*
|
|
91
|
+
- [`a20ec0e`](https://github.com/tobymao/sqlglot/commit/a20ec0ee493bc0836ab44439ef7d0ed68f91f674) - **optimizer**: unpivot annotate types *(PR [#7543](https://github.com/tobymao/sqlglot/pull/7543) by [@geooo109](https://github.com/geooo109))*
|
|
92
|
+
- [`fd48100`](https://github.com/tobymao/sqlglot/commit/fd4810018e2ea602e1c59994ebe517b1c06d7f49) - **presto**: generate "SUBSTR" instead of "SUBSTRING" for Substr expr *(PR [#7583](https://github.com/tobymao/sqlglot/pull/7583) by [@georgesittas](https://github.com/georgesittas))*
|
|
93
|
+
- :arrow_lower_right: *fixes issue [#7581](https://github.com/tobymao/sqlglot/issues/7581) opened by [@cyber-jessie](https://github.com/cyber-jessie)*
|
|
94
|
+
- [`1cf31d6`](https://github.com/tobymao/sqlglot/commit/1cf31d6bd00a1c5ce3fe6722e7ed87c900074ad0) - **annotate**: register typing for FirstValue and RegexpExtract *(commit by [@RichardHughes-amp](https://github.com/RichardHughes-amp))*
|
|
95
|
+
- [`9f169ab`](https://github.com/tobymao/sqlglot/commit/9f169ab17a8ada0a53e2d88c035196db673e37c4) - **redshift**: support `APPROXIMATE PERCENTILE_DISC` round-trip *(PR [#7585](https://github.com/tobymao/sqlglot/pull/7585) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
96
|
+
- [`17432c6`](https://github.com/tobymao/sqlglot/commit/17432c61175194ee0f56f0703393e8c5fdc9e81f) - **generator**: do not indent newlines within identifiers in pretty mode fixes [#7953](https://github.com/tobymao/sqlglot/pull/7953) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
97
|
+
- [`e550d00`](https://github.com/tobymao/sqlglot/commit/e550d008cc6ffa72b046d6406911b256c4a75f8b) - **parser**: FROM with JOIN subqueries *(PR [#7597](https://github.com/tobymao/sqlglot/pull/7597) by [@geooo109](https://github.com/geooo109))*
|
|
98
|
+
- :arrow_lower_right: *fixes issue [#7596](https://github.com/tobymao/sqlglot/issues/7596) opened by [@vietspaceanh](https://github.com/vietspaceanh)*
|
|
99
|
+
|
|
100
|
+
### :zap: Performance Improvements
|
|
101
|
+
- [`63f8dc6`](https://github.com/tobymao/sqlglot/commit/63f8dc6dfc19d4ae14984d393bc63532c1085e07) - **tokens**: cache TokenizerCore per thread *(PR [#7547](https://github.com/tobymao/sqlglot/pull/7547) by [@tobymao](https://github.com/tobymao))*
|
|
102
|
+
- [`9b65c91`](https://github.com/tobymao/sqlglot/commit/9b65c91f8d510682af203015b561d92ce8a2e477) - **build**: parallelize mypyc compile with -j $(NPROC) *(PR [#7554](https://github.com/tobymao/sqlglot/pull/7554) by [@tobymao](https://github.com/tobymao))*
|
|
103
|
+
- [`fc6e7cb`](https://github.com/tobymao/sqlglot/commit/fc6e7cb093583d44ac4863d770b583e75d45f365) - **parser**: short-circuit _parse_pivots when next token isn't PIVOT/UNPIVOT *(PR [#7557](https://github.com/tobymao/sqlglot/pull/7557) by [@tobymao](https://github.com/tobymao))*
|
|
104
|
+
|
|
105
|
+
### :recycle: Refactors
|
|
106
|
+
- [`38b8986`](https://github.com/tobymao/sqlglot/commit/38b89860020d4bb7fc7be8408b67852f8cf380ae) - simplify uuid_sql using @unsupported_args decorator *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
107
|
+
- [`49787a5`](https://github.com/tobymao/sqlglot/commit/49787a59dcbcaca97a49cd504c4e35f8db1408a3) - remove redundant CAST from UUID_V5_TEMPLATE *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
108
|
+
- [`e883b0b`](https://github.com/tobymao/sqlglot/commit/e883b0b39ebdeeab408743786f66d62dd92b3267) - map duckdb `LIST` to `ArrayAgg` *(PR [#7552](https://github.com/tobymao/sqlglot/pull/7552) by [@georgesittas](https://github.com/georgesittas))*
|
|
109
|
+
- [`1d976e6`](https://github.com/tobymao/sqlglot/commit/1d976e665a8687e7ca2411a9a2a5139eb5698849) - raise if a projection is unnamed in lineage *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
110
|
+
- [`b3fa159`](https://github.com/tobymao/sqlglot/commit/b3fa15979866947adbb600ae9b1d24e048997dad) - **optimizer**: continuation on typing coverage improvements *(PR [#7572](https://github.com/tobymao/sqlglot/pull/7572) by [@OutSquareCapital](https://github.com/OutSquareCapital))*
|
|
111
|
+
|
|
112
|
+
### :white_check_mark: Tests
|
|
113
|
+
- [`9bc9ef2`](https://github.com/tobymao/sqlglot/commit/9bc9ef2e7dfd98a5340167012fa0ea782cca1264) - update UUID_STRING test for removed CAST *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
114
|
+
|
|
115
|
+
### :wrench: Chores
|
|
116
|
+
- [`fc99ddc`](https://github.com/tobymao/sqlglot/commit/fc99ddc936c095fb813e56cfe10006701ece9893) - update integration tests submodule *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
|
|
117
|
+
- [`e4a2fdc`](https://github.com/tobymao/sqlglot/commit/e4a2fdcdaf3e8ac423884e482191e002ab677235) - **exasol**: test GROUP BY alias rewrite via _add_local_prefix_for_aliases *(PR [#7569](https://github.com/tobymao/sqlglot/pull/7569) by [@mkcorneli](https://github.com/mkcorneli))*
|
|
118
|
+
- [`43be379`](https://github.com/tobymao/sqlglot/commit/43be379b75f6e3d8ea66ac3849f4fb5c55736145) - bump sqlglot-mypy to 1.20.0.post6 *(PR [#7598](https://github.com/tobymao/sqlglot/pull/7598) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
119
|
+
- [`9bd7e7c`](https://github.com/tobymao/sqlglot/commit/9bd7e7c83ff1e3c73f6d071a7bd47ec208e25ca4) - **publish**: Do not build sqlglotc wheels for 3.9 *(PR [#7600](https://github.com/tobymao/sqlglot/pull/7600) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## [v30.6.0] - 2026-04-20
|
|
123
|
+
### :boom: BREAKING CHANGES
|
|
124
|
+
- due to [`dcf9ed5`](https://github.com/tobymao/sqlglot/commit/dcf9ed58303bf320f3e3498618bd95639037efde) - compile python generator *(PR [#7528](https://github.com/tobymao/sqlglot/pull/7528) by [@georgesittas](https://github.com/georgesittas))*:
|
|
125
|
+
|
|
126
|
+
compile python generator (#7528)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### :sparkles: New Features
|
|
130
|
+
- [`dcf9ed5`](https://github.com/tobymao/sqlglot/commit/dcf9ed58303bf320f3e3498618bd95639037efde) - **mypyc**: compile python generator *(PR [#7528](https://github.com/tobymao/sqlglot/pull/7528) by [@georgesittas](https://github.com/georgesittas))*
|
|
131
|
+
|
|
132
|
+
### :bug: Bug Fixes
|
|
133
|
+
- [`8e5e255`](https://github.com/tobymao/sqlglot/commit/8e5e2557c7f40c61fcf08d22141a3dd94b3a2ccb) - **postgres**: dotted function calls in create trigger ddls closes [#7527](https://github.com/tobymao/sqlglot/pull/7527) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
134
|
+
|
|
135
|
+
### :wrench: Chores
|
|
136
|
+
- [`08ea329`](https://github.com/tobymao/sqlglot/commit/08ea3293631ba930d01bbb2b62cca969354f8134) - avoid git submodule errors when publishing API docs *(PR [#7526](https://github.com/tobymao/sqlglot/pull/7526) by [@georgesittas](https://github.com/georgesittas))*
|
|
137
|
+
|
|
138
|
+
|
|
4
139
|
## [v30.5.0] - 2026-04-20
|
|
5
140
|
### :boom: BREAKING CHANGES
|
|
6
141
|
- due to [`98ca4cd`](https://github.com/tobymao/sqlglot/commit/98ca4cdd60124c0e566d1de40855b30a169219fd) - transpile TRY_DIVIDE to/from other dialects [CLAUDE] *(PR [#7489](https://github.com/tobymao/sqlglot/pull/7489) by [@baruchoxman](https://github.com/baruchoxman))*:
|
|
@@ -14226,3 +14361,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
14226
14361
|
[v30.4.2]: https://github.com/tobymao/sqlglot/compare/v30.4.1...v30.4.2
|
|
14227
14362
|
[v30.4.3]: https://github.com/tobymao/sqlglot/compare/v30.4.2...v30.4.3
|
|
14228
14363
|
[v30.5.0]: https://github.com/tobymao/sqlglot/compare/v30.4.3...v30.5.0
|
|
14364
|
+
[v30.6.0]: https://github.com/tobymao/sqlglot/compare/v30.5.0...v30.6.0
|
|
14365
|
+
[v30.7.0]: https://github.com/tobymao/sqlglot/compare/v30.6.0...v30.7.0
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 leakcheck style check docs docs-serve hidec showc clean resolve-integration-conflicts update-fixtures
|
|
2
2
|
|
|
3
3
|
ifdef UV
|
|
4
4
|
PIP := uv pip
|
|
@@ -8,6 +8,7 @@ endif
|
|
|
8
8
|
|
|
9
9
|
SO_BACKUP := /tmp/sqlglot_so_backup
|
|
10
10
|
FIND_SO := find sqlglot -name "*.so"
|
|
11
|
+
NPROC := $(shell python -c "import os; print(os.cpu_count() or 1)")
|
|
11
12
|
|
|
12
13
|
hidec:
|
|
13
14
|
rm -rf $(SO_BACKUP) && $(FIND_SO) | tar cf $(SO_BACKUP) -T - 2>/dev/null && $(FIND_SO) -delete; true
|
|
@@ -37,11 +38,23 @@ install-dev:
|
|
|
37
38
|
fi; \
|
|
38
39
|
fi
|
|
39
40
|
|
|
41
|
+
# sqlglotc requires Python 3.10+ (sqlglot-mypy 1.20+ dropped 3.9). On 3.9
|
|
42
|
+
# we skip the C build; tests fall back to pure-Python sqlglot.
|
|
43
|
+
PY_GE_310 := $(shell python -c "import sys; print(int(sys.version_info >= (3, 10)))")
|
|
44
|
+
|
|
40
45
|
install-devc:
|
|
41
|
-
|
|
46
|
+
@if [ "$(PY_GE_310)" = "1" ]; then \
|
|
47
|
+
cd sqlglotc && MYPYC_OPT=0 python setup.py build_ext --inplace -j $(NPROC); \
|
|
48
|
+
else \
|
|
49
|
+
echo "Skipping sqlglotc build: requires Python 3.10+"; \
|
|
50
|
+
fi
|
|
42
51
|
|
|
43
52
|
install-devc-release: clean
|
|
44
|
-
|
|
53
|
+
@if [ "$(PY_GE_310)" = "1" ]; then \
|
|
54
|
+
cd sqlglotc && python setup.py build_ext --inplace -j $(NPROC); \
|
|
55
|
+
else \
|
|
56
|
+
echo "Skipping sqlglotc build: requires Python 3.10+"; \
|
|
57
|
+
fi
|
|
45
58
|
|
|
46
59
|
install-pre-commit:
|
|
47
60
|
pre-commit install
|
|
@@ -77,6 +90,9 @@ testc: install-devc
|
|
|
77
90
|
unitc: install-devc
|
|
78
91
|
SKIP_INTEGRATION=1 python -m unittest
|
|
79
92
|
|
|
93
|
+
leakcheck: install-devc
|
|
94
|
+
python -m tests.leakcheck
|
|
95
|
+
|
|
80
96
|
style:
|
|
81
97
|
pre-commit run --all-files
|
|
82
98
|
@if [ -f sqlglot-integration-tests/Makefile ]; then $(MAKE) -C sqlglot-integration-tests check-submodule; fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.8.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
|
|
@@ -19,7 +19,8 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: duckdb>=0.6; extra == "dev"
|
|
22
|
-
Requires-Dist: sqlglot-mypy; extra == "dev"
|
|
22
|
+
Requires-Dist: sqlglot-mypy>=1.20.0.post6; python_version >= "3.10" and extra == "dev"
|
|
23
|
+
Requires-Dist: mypy; python_version < "3.10" and extra == "dev"
|
|
23
24
|
Requires-Dist: setuptools_scm; extra == "dev"
|
|
24
25
|
Requires-Dist: pandas; extra == "dev"
|
|
25
26
|
Requires-Dist: pandas-stubs; extra == "dev"
|
|
@@ -33,10 +34,10 @@ Requires-Dist: types-pytz; extra == "dev"
|
|
|
33
34
|
Requires-Dist: typing_extensions; extra == "dev"
|
|
34
35
|
Requires-Dist: pyperf; extra == "dev"
|
|
35
36
|
Provides-Extra: c
|
|
36
|
-
Requires-Dist: sqlglotc==30.
|
|
37
|
+
Requires-Dist: sqlglotc==30.8.0; python_version >= "3.10" and extra == "c"
|
|
37
38
|
Provides-Extra: rs
|
|
38
39
|
Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
|
|
39
|
-
Requires-Dist: sqlglotc==30.
|
|
40
|
+
Requires-Dist: sqlglotc==30.8.0; python_version >= "3.10" and extra == "rs"
|
|
40
41
|
Dynamic: license-file
|
|
41
42
|
Dynamic: provides-extra
|
|
42
43
|
|
sqlglot-30.8.0/setup.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
from setuptools_scm import get_version
|
|
3
|
+
|
|
4
|
+
version = get_version(local_scheme="no-local-version")
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
extras_require={
|
|
8
|
+
"dev": [
|
|
9
|
+
"duckdb>=0.6",
|
|
10
|
+
# sqlglot-mypy 1.20+ is the build dep for sqlglotc and only ships
|
|
11
|
+
# for py3.10+; on py3.9 just use upstream mypy for type checking.
|
|
12
|
+
"sqlglot-mypy >= 1.20.0.post6; python_version >= '3.10'",
|
|
13
|
+
"mypy; python_version < '3.10'",
|
|
14
|
+
"setuptools_scm",
|
|
15
|
+
"pandas",
|
|
16
|
+
"pandas-stubs",
|
|
17
|
+
"python-dateutil",
|
|
18
|
+
"pytz",
|
|
19
|
+
"pdoc",
|
|
20
|
+
"pre-commit",
|
|
21
|
+
"ruff==0.15.6",
|
|
22
|
+
"types-python-dateutil",
|
|
23
|
+
"types-pytz",
|
|
24
|
+
"typing_extensions",
|
|
25
|
+
"pyperf",
|
|
26
|
+
],
|
|
27
|
+
# Compiles from source on the user's machine. Requires Python 3.10+
|
|
28
|
+
# because the build dep (sqlglot-mypy 1.20+) dropped 3.9; on 3.9
|
|
29
|
+
# `pip install sqlglot[c]` is a no-op and you just get pure-Python sqlglot.
|
|
30
|
+
"c": [f"sqlglotc=={version}; python_version >= '3.10'"],
|
|
31
|
+
# Deprecated: the Rust tokenizer has been replaced by sqlglotc.
|
|
32
|
+
"rs": ["sqlglotrs==0.13.0", f"sqlglotc=={version}; python_version >= '3.10'"],
|
|
33
|
+
},
|
|
34
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ruff: noqa: F401
|
|
1
|
+
# ruff: noqa: F401
|
|
2
2
|
"""
|
|
3
3
|
.. include:: ../README.md
|
|
4
4
|
|
|
@@ -7,25 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
|
-
# bootstrap mypyc runtime: compiled .so modules do a top-level `import HASH__mypyc`,
|
|
11
|
-
# but the runtime .so lives inside sqlglot/. Pre-load it into sys.modules.
|
|
12
|
-
# this is only needed for editable builds
|
|
13
10
|
from collections.abc import Collection
|
|
14
|
-
import sys
|
|
15
|
-
from pathlib import Path
|
|
16
11
|
from builtins import type as Type
|
|
17
12
|
|
|
18
|
-
for path in Path(__file__).parent.glob("*__mypyc*.so"):
|
|
19
|
-
name = path.stem.split(".")[0]
|
|
20
|
-
if name not in sys.modules:
|
|
21
|
-
import importlib.util
|
|
22
|
-
|
|
23
|
-
spec = importlib.util.spec_from_file_location(name, path)
|
|
24
|
-
if spec and spec.loader:
|
|
25
|
-
mod = importlib.util.module_from_spec(spec)
|
|
26
|
-
sys.modules[name] = mod
|
|
27
|
-
spec.loader.exec_module(mod)
|
|
28
|
-
|
|
29
13
|
import logging
|
|
30
14
|
import typing as t
|
|
31
15
|
|
|
@@ -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.8.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 8, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g9e37283ab'
|
|
@@ -399,6 +399,9 @@ class Dialect(metaclass=_Dialect):
|
|
|
399
399
|
CONCAT_COALESCE = False
|
|
400
400
|
"""A `NULL` arg in `CONCAT` yields `NULL` by default, but in some dialects it yields an empty string."""
|
|
401
401
|
|
|
402
|
+
CONCAT_WS_COALESCE = False
|
|
403
|
+
"""A `NULL` arg in `CONCAT_WS` yields `NULL` by default, but in some dialects it is skipped."""
|
|
404
|
+
|
|
402
405
|
HEX_LOWERCASE = False
|
|
403
406
|
"""Whether the `HEX` function returns a lowercase hexadecimal string."""
|
|
404
407
|
|
|
@@ -1216,7 +1219,9 @@ def inline_array_unless_query(self: Generator, expression: exp.Expr) -> str:
|
|
|
1216
1219
|
def no_ilike_sql(self: Generator, expression: exp.ILike) -> str:
|
|
1217
1220
|
return self.like_sql(
|
|
1218
1221
|
exp.Like(
|
|
1219
|
-
this=exp.Lower(this=expression.this),
|
|
1222
|
+
this=exp.Lower(this=expression.this),
|
|
1223
|
+
expression=exp.Lower(this=expression.expression),
|
|
1224
|
+
negate=expression.args.get("negate"),
|
|
1220
1225
|
)
|
|
1221
1226
|
)
|
|
1222
1227
|
|
|
@@ -1535,28 +1540,32 @@ def months_between_sql(self: Generator, expression: exp.MonthsBetween) -> str:
|
|
|
1535
1540
|
|
|
1536
1541
|
|
|
1537
1542
|
def build_formatted_time(
|
|
1538
|
-
exp_class: Type[E],
|
|
1539
|
-
) -> t.Callable[[BuilderArgs], E]:
|
|
1543
|
+
exp_class: Type[E], dialect_override: str | None = None, default: bool | str | None = None
|
|
1544
|
+
) -> t.Callable[[BuilderArgs, Dialect], E]:
|
|
1540
1545
|
"""Helper used for time expressions.
|
|
1541
1546
|
|
|
1542
1547
|
Args:
|
|
1543
1548
|
exp_class: the expression class to instantiate.
|
|
1544
|
-
|
|
1549
|
+
dialect_override: optional sql dialect to override the parser's one.
|
|
1545
1550
|
default: the default format, True being time.
|
|
1546
1551
|
|
|
1547
1552
|
Returns:
|
|
1548
1553
|
A callable that can be used to return the appropriately formatted time expression.
|
|
1549
1554
|
"""
|
|
1550
1555
|
|
|
1551
|
-
def _builder(args: BuilderArgs) -> E:
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
or (Dialect[dialect].TIME_FORMAT if default is True else default or None)
|
|
1557
|
-
),
|
|
1556
|
+
def _builder(args: BuilderArgs, dialect: Dialect) -> E:
|
|
1557
|
+
target_dialect = (
|
|
1558
|
+
t.cast(Dialect, Dialect[dialect_override])
|
|
1559
|
+
if isinstance(dialect_override, str)
|
|
1560
|
+
else dialect
|
|
1558
1561
|
)
|
|
1559
1562
|
|
|
1563
|
+
fmt = seq_get(args, 1)
|
|
1564
|
+
if not fmt:
|
|
1565
|
+
fmt = target_dialect.TIME_FORMAT if default is True else default or None
|
|
1566
|
+
|
|
1567
|
+
return exp_class(this=seq_get(args, 0), format=target_dialect.format_time(fmt))
|
|
1568
|
+
|
|
1560
1569
|
return _builder
|
|
1561
1570
|
|
|
1562
1571
|
|
|
@@ -1761,15 +1770,16 @@ def count_if_to_sum(self: Generator, expression: exp.CountIf) -> str:
|
|
|
1761
1770
|
|
|
1762
1771
|
|
|
1763
1772
|
def trim_sql(self: Generator, expression: exp.Trim, default_trim_type: str = "") -> str:
|
|
1764
|
-
target = self.sql(expression, "this")
|
|
1765
|
-
trim_type = self.sql(expression, "position") or default_trim_type
|
|
1766
1773
|
remove_chars = self.sql(expression, "expression")
|
|
1767
|
-
collation = self.sql(expression, "collation")
|
|
1768
1774
|
|
|
1769
1775
|
# Use TRIM/LTRIM/RTRIM syntax if the expression isn't database-specific
|
|
1770
1776
|
if not remove_chars:
|
|
1771
1777
|
return self.trim_sql(expression)
|
|
1772
1778
|
|
|
1779
|
+
target = self.sql(expression, "this")
|
|
1780
|
+
trim_type = self.sql(expression, "position") or default_trim_type
|
|
1781
|
+
collation = self.sql(expression, "collation")
|
|
1782
|
+
|
|
1773
1783
|
trim_type = f"{trim_type} " if trim_type else ""
|
|
1774
1784
|
remove_chars = f"{remove_chars} " if remove_chars else ""
|
|
1775
1785
|
from_part = "FROM " if trim_type or remove_chars else ""
|
|
@@ -1827,7 +1837,7 @@ def pivot_column_names(aggregations: Iterable[exp.Expr], dialect: DialectType) -
|
|
|
1827
1837
|
be quoted in the base parser's `_parse_pivot` method, due to `to_identifier`.
|
|
1828
1838
|
Otherwise, we'd end up with `col_avg(`foo`)` (notice the double quotes).
|
|
1829
1839
|
"""
|
|
1830
|
-
agg_all_unquoted = agg.transform(
|
|
1840
|
+
agg_all_unquoted: exp.Expr = agg.transform(
|
|
1831
1841
|
lambda node: (
|
|
1832
1842
|
exp.Identifier(this=node.name, quoted=False)
|
|
1833
1843
|
if isinstance(node, exp.Identifier)
|
|
@@ -2236,7 +2246,7 @@ def build_default_decimal_type(
|
|
|
2236
2246
|
return dtype
|
|
2237
2247
|
|
|
2238
2248
|
params = f"{precision}{f', {scale}' if scale is not None else ''}"
|
|
2239
|
-
return exp.DataType.
|
|
2249
|
+
return exp.DataType.from_str(f"DECIMAL({params})")
|
|
2240
2250
|
|
|
2241
2251
|
return _builder
|
|
2242
2252
|
|
|
@@ -2459,8 +2469,7 @@ def build_timetostr_or_tochar(
|
|
|
2459
2469
|
annotate_types(this, dialect=dialect)
|
|
2460
2470
|
|
|
2461
2471
|
if this.is_type(*exp.DataType.TEMPORAL_TYPES):
|
|
2462
|
-
|
|
2463
|
-
return build_formatted_time(exp.TimeToStr, dialect_name, default=True)(args)
|
|
2472
|
+
return build_formatted_time(exp.TimeToStr, default=True)(args, t.cast(Dialect, dialect))
|
|
2464
2473
|
|
|
2465
2474
|
return exp.ToChar.from_arg_list(args)
|
|
2466
2475
|
|
|
@@ -19,10 +19,12 @@ class DuckDB(Dialect):
|
|
|
19
19
|
SAFE_DIVISION = True
|
|
20
20
|
INDEX_OFFSET = 1
|
|
21
21
|
CONCAT_COALESCE = True
|
|
22
|
+
CONCAT_WS_COALESCE = True
|
|
22
23
|
SUPPORTS_ORDER_BY_ALL = True
|
|
23
24
|
SUPPORTS_FIXED_SIZE_ARRAYS = True
|
|
24
25
|
STRICT_JSON_PATH_SYNTAX = False
|
|
25
26
|
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
|
|
27
|
+
UUID_IS_STRING_TYPE = False
|
|
26
28
|
|
|
27
29
|
# https://duckdb.org/docs/sql/introduction.html#creating-a-new-table
|
|
28
30
|
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_INSENSITIVE
|
|
@@ -20,6 +20,7 @@ class Hive(Dialect):
|
|
|
20
20
|
IDENTIFIERS_CAN_START_WITH_DIGIT = True
|
|
21
21
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
22
22
|
SAFE_DIVISION = True
|
|
23
|
+
CONCAT_WS_COALESCE = True
|
|
23
24
|
ARRAY_AGG_INCLUDES_NULLS = None
|
|
24
25
|
REGEXP_EXTRACT_DEFAULT_GROUP = 1
|
|
25
26
|
ALTER_TABLE_SUPPORTS_CASCADE = True
|
|
@@ -11,6 +11,7 @@ class Postgres(Dialect):
|
|
|
11
11
|
INDEX_OFFSET = 1
|
|
12
12
|
TYPED_DIVISION = True
|
|
13
13
|
CONCAT_COALESCE = True
|
|
14
|
+
CONCAT_WS_COALESCE = True
|
|
14
15
|
NULL_ORDERING = "nulls_are_large"
|
|
15
16
|
TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
|
|
16
17
|
TABLESAMPLE_SIZE_IS_PERCENT = True
|
|
@@ -97,6 +98,7 @@ class Postgres(Dialect):
|
|
|
97
98
|
"SERIAL": TokenType.SERIAL,
|
|
98
99
|
"SMALLSERIAL": TokenType.SMALLSERIAL,
|
|
99
100
|
"TEMP": TokenType.TEMPORARY,
|
|
101
|
+
"TYPE": TokenType.TYPE,
|
|
100
102
|
"REGCLASS": TokenType.OBJECT_IDENTIFIER,
|
|
101
103
|
"REGCOLLATION": TokenType.OBJECT_IDENTIFIER,
|
|
102
104
|
"REGCONFIG": TokenType.OBJECT_IDENTIFIER,
|
|
@@ -24,7 +24,12 @@ class Redshift(Postgres):
|
|
|
24
24
|
|
|
25
25
|
# ref: https://docs.aws.amazon.com/redshift/latest/dg/r_FORMAT_strings.html
|
|
26
26
|
TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
TIME_MAPPING = {
|
|
29
|
+
**Postgres.TIME_MAPPING,
|
|
30
|
+
"MON": "%b",
|
|
31
|
+
"MONTH": "%B",
|
|
32
|
+
}
|
|
28
33
|
|
|
29
34
|
Parser = RedshiftParser
|
|
30
35
|
|
|
@@ -36,13 +41,15 @@ class Redshift(Postgres):
|
|
|
36
41
|
KEYWORDS = {
|
|
37
42
|
**Postgres.Tokenizer.KEYWORDS,
|
|
38
43
|
"(+)": TokenType.JOIN_MARKER,
|
|
44
|
+
"BINARY VARYING": TokenType.VARBINARY,
|
|
45
|
+
"CURRENT_USER_ID": TokenType.CURRENT_USER_ID,
|
|
39
46
|
"HLLSKETCH": TokenType.HLLSKETCH,
|
|
40
47
|
"MINUS": TokenType.EXCEPT,
|
|
41
48
|
"SUPER": TokenType.SUPER,
|
|
42
49
|
"TOP": TokenType.TOP,
|
|
43
50
|
"UNLOAD": TokenType.COMMAND,
|
|
51
|
+
"USER": TokenType.CURRENT_USER,
|
|
44
52
|
"VARBYTE": TokenType.VARBINARY,
|
|
45
|
-
"BINARY VARYING": TokenType.VARBINARY,
|
|
46
53
|
}
|
|
47
54
|
KEYWORDS.pop("VALUES")
|
|
48
55
|
|
|
@@ -189,7 +189,11 @@ class Flatten(Expression, Func):
|
|
|
189
189
|
|
|
190
190
|
class StringToArray(Expression, Func):
|
|
191
191
|
arg_types = {"this": True, "expression": False, "null": False}
|
|
192
|
-
_sql_names = ["STRING_TO_ARRAY", "SPLIT_BY_STRING"
|
|
192
|
+
_sql_names = ["STRING_TO_ARRAY", "SPLIT_BY_STRING"]
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class StrtokToArray(Expression, Func):
|
|
196
|
+
arg_types = {"this": True, "expression": False}
|
|
193
197
|
|
|
194
198
|
|
|
195
199
|
# Higher-order / lambda
|
|
@@ -361,5 +365,5 @@ class StDistance(Expression, Func):
|
|
|
361
365
|
|
|
362
366
|
|
|
363
367
|
class StPoint(Expression, Func):
|
|
364
|
-
arg_types = {"this": True, "expression": True, "
|
|
368
|
+
arg_types = {"this": True, "expression": True, "z": False, "m": False}
|
|
365
369
|
_sql_names = ["ST_POINT", "ST_MAKEPOINT"]
|