sqlglot 30.31.0__tar.gz → 30.32.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.31.0 → sqlglot-30.32.0}/CHANGELOG.md +59 -0
- {sqlglot-30.31.0/sqlglot.egg-info → sqlglot-30.32.0}/PKG-INFO +3 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/clickhouse.py +8 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/dialect.py +128 -6
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/oracle.py +2 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/teradata.py +3 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/aggregate.py +8 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/array.py +1 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/core.py +18 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/query.py +9 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/string.py +2 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/temporal.py +15 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generator.py +140 -18
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/athena.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/bigquery.py +54 -4
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/clickhouse.py +24 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/databricks.py +66 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/dremio.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/drill.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/druid.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/duckdb.py +103 -22
- sqlglot-30.32.0/sqlglot/generators/dune.py +16 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/exasol.py +15 -13
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/hive.py +26 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/mysql.py +9 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/oracle.py +16 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/postgres.py +6 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/presto.py +14 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/redshift.py +13 -5
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/singlestore.py +0 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/snowflake.py +20 -6
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/spark.py +12 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/spark2.py +8 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/sqlite.py +14 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/tableau.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/teradata.py +19 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/trino.py +1 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/tsql.py +23 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/annotate_types.py +2 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/eliminate_joins.py +16 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/merge_subqueries.py +68 -5
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/optimize_joins.py +23 -7
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/pushdown_predicates.py +10 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/qualify_columns.py +53 -13
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/qualify_tables.py +2 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/resolver.py +13 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/scope.py +17 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/simplify.py +41 -8
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/unnest_subqueries.py +42 -36
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parser.py +57 -16
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/bigquery.py +26 -6
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/clickhouse.py +16 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/duckdb.py +14 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/exasol.py +5 -5
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/hive.py +1 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/mysql.py +6 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/oracle.py +8 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/postgres.py +19 -10
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/presto.py +7 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/snowflake.py +19 -4
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/spark2.py +6 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/sqlite.py +14 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/teradata.py +117 -6
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/schema.py +56 -38
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/tokenizer_core.py +17 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/transforms.py +26 -20
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/__init__.py +10 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/bigquery.py +32 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/postgres.py +19 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/redshift.py +14 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/snowflake.py +7 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0/sqlglot.egg-info}/PKG-INFO +3 -3
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.egg-info/SOURCES.txt +2 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.egg-info/scm_file_list.json +2 -0
- sqlglot-30.32.0/sqlglot.egg-info/scm_version.json +8 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_bigquery.py +213 -5
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_clickhouse.py +53 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_databricks.py +98 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_dialect.py +87 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_duckdb.py +125 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_exasol.py +39 -20
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_hive.py +24 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_mysql.py +72 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_oracle.py +116 -17
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_postgres.py +231 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_presto.py +13 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_redshift.py +20 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_snowflake.py +146 -17
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_spark.py +84 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_sqlite.py +184 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_starrocks.py +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_teradata.py +501 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_tsql.py +60 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/annotate_functions.sql +24 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/eliminate_joins.sql +105 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +2 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/isolate_table_selects.sql +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/merge_subqueries.sql +153 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/optimize_joins.sql +15 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/optimizer.sql +42 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/pushdown_predicates.sql +89 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/pushdown_projections.sql +1 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/qualify_columns.sql +84 -2
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/qualify_tables.sql +4 -4
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/simplify.sql +26 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/unnest_subqueries.sql +59 -6
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_build.py +15 -1
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_generator.py +24 -0
- sqlglot-30.32.0/tests/test_optimize_cross_joins.py +53 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_optimizer.py +493 -24
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_parser.py +19 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_schema.py +117 -0
- sqlglot-30.32.0/tests/test_simplify_between.py +63 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_tokens.py +21 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_transpile.py +32 -0
- sqlglot-30.31.0/sqlglot/generators/dune.py +0 -14
- sqlglot-30.31.0/sqlglot.egg-info/scm_version.json +0 -8
- {sqlglot-30.31.0 → sqlglot-30.32.0}/.gitignore +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/.gitmodules +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/.gitpod.yml +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/AGENTS.md +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/CLAUDE.md +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/LICENSE +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/MANIFEST.in +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/Makefile +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/README.md +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/pyproject.toml +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/setup.cfg +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/setup.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/anonymize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/dax.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/dremio.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/hive.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/postgres.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/spark2.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/functions.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/dax.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/helpers.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/journal.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/pushdown_projections.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/databricks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/dax.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/redshift.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/time.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/tokens.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/databricks.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/duckdb.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/hive.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglot.png +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/sqlglotc/setup.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_dax.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/dialects/test_trino.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/helpers.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_anonymize.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_diff.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_docs.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_errors.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_executor.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_helper.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_lineage.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_serde.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_sqlglotc.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_time.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.31.0 → sqlglot-30.32.0}/tests/test_typing.py +0 -0
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.31.0] - 2026-11-10
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`56525f7`](https://github.com/tobymao/sqlglot/commit/56525f74855190c45b102e7f0aee7d6d80d3a480) - NormalizationStrategy.CASE_INSENSITIVE_EXCEPT_TALBES *(PR [#8935](https://github.com/tobymao/sqlglot/pull/8935) by [@barakalon](https://github.com/barakalon))*:
|
|
7
|
+
|
|
8
|
+
NormalizationStrategy.CASE_INSENSITIVE_EXCEPT_TALBES (#8935)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### :sparkles: New Features
|
|
12
|
+
- [`062a971`](https://github.com/tobymao/sqlglot/commit/062a971e79e2a77a6d1084bbd3d901a1b25540f3) - **teradata**: parse EXECUTE macro calls [CODEX] *(PR [#8948](https://github.com/tobymao/sqlglot/pull/8948) by [@Walkeer](https://github.com/Walkeer))*
|
|
13
|
+
- :arrow_lower_right: *addresses issue [#8947](https://github.com/tobymao/sqlglot/issues/8947) opened by [@Walkeer](https://github.com/Walkeer)*
|
|
14
|
+
- [`1ddb63b`](https://github.com/tobymao/sqlglot/commit/1ddb63b02509f7f6446edfb4026dd2967966a8a3) - **Bigquery**: Preserve struct type inside array in bigquery *(PR [#8921](https://github.com/tobymao/sqlglot/pull/8921) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
15
|
+
- [`4f6e8d8`](https://github.com/tobymao/sqlglot/commit/4f6e8d87ad6a8fcdcca490f1c0d36d54103aa40f) - **Snowflake**: Support Snowflake TO_JSON varchar type *(PR [#8975](https://github.com/tobymao/sqlglot/pull/8975) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
16
|
+
- [`c14c969`](https://github.com/tobymao/sqlglot/commit/c14c9698e28527103b8a5cfe1c183d1334291d98) - **teradata**: parse TITLE display headings [CODEX] *(PR [#8974](https://github.com/tobymao/sqlglot/pull/8974) by [@Walkeer](https://github.com/Walkeer))*
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fixes
|
|
19
|
+
- [`b74097a`](https://github.com/tobymao/sqlglot/commit/b74097a1abddbdfefdf1ec4f470e4ea71bfddbc5) - **tokenizer**: parse SAVEPOINT and RELEASE as commands *(PR [#8920](https://github.com/tobymao/sqlglot/pull/8920) by [@chinmayajha](https://github.com/chinmayajha))*
|
|
20
|
+
- [`4269a98`](https://github.com/tobymao/sqlglot/commit/4269a98ac893364c8ae32529357c2d97a583dfa4) - **sqlite**: parse underscore digit separators in numbers [CLAUDE] *(PR [#8923](https://github.com/tobymao/sqlglot/pull/8923) by [@chinmayajha](https://github.com/chinmayajha))*
|
|
21
|
+
- [`b99f5d5`](https://github.com/tobymao/sqlglot/commit/b99f5d58b1773276544b513e072273789cf2549a) - **sqlite**: keep STRICT and parse WITHOUT ROWID table options [CLAUDE] *(PR [#8925](https://github.com/tobymao/sqlglot/pull/8925) by [@chinmayajha](https://github.com/chinmayajha))*
|
|
22
|
+
- [`dae5a7c`](https://github.com/tobymao/sqlglot/commit/dae5a7c533039f6a38d160bd67f23bfcad3670e7) - **sqlite**: parse REINDEX as a command [CLAUDE] *(PR [#8929](https://github.com/tobymao/sqlglot/pull/8929) by [@chinmayajha](https://github.com/chinmayajha))*
|
|
23
|
+
- [`56525f7`](https://github.com/tobymao/sqlglot/commit/56525f74855190c45b102e7f0aee7d6d80d3a480) - NormalizationStrategy.CASE_INSENSITIVE_EXCEPT_TALBES *(PR [#8935](https://github.com/tobymao/sqlglot/pull/8935) by [@barakalon](https://github.com/barakalon))*
|
|
24
|
+
- [`4a60ec8`](https://github.com/tobymao/sqlglot/commit/4a60ec83a8f60e4776ab002e750d7506d273db89) - **databricks**: parse TIMESTAMP WITHOUT TIME ZONE into TIMESTAMP_NTZ *(PR [#8926](https://github.com/tobymao/sqlglot/pull/8926) by [@treysp](https://github.com/treysp))*
|
|
25
|
+
- [`8a06b18`](https://github.com/tobymao/sqlglot/commit/8a06b18aa63de673c7ad4f2fd304d68e87438573) - **presto**: preserve DATE_TRUNC input type when transpiling to DuckDB *(PR [#8945](https://github.com/tobymao/sqlglot/pull/8945) by [@baruchoxman](https://github.com/baruchoxman))*
|
|
26
|
+
- :arrow_lower_right: *fixes issue [#8944](https://github.com/tobymao/sqlglot/issues/8944) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
27
|
+
- [`cfda786`](https://github.com/tobymao/sqlglot/commit/cfda7864eaa2557348657358ec7ede6b5650f4aa) - **generator**: warn on slices in dialects with bracket-quoted identifiers *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
28
|
+
- [`cf60275`](https://github.com/tobymao/sqlglot/commit/cf6027514078544cbc3c1a470072946285efa475) - **redshift**: drop DISTKEY/SORTKEY/DISTSTYLE when generating other dialects *(PR [#8938](https://github.com/tobymao/sqlglot/pull/8938) by [@zgurung](https://github.com/zgurung))*
|
|
29
|
+
- :arrow_lower_right: *fixes issue [#8937](https://github.com/tobymao/sqlglot/issues/8937) opened by [@zgurung](https://github.com/zgurung)*
|
|
30
|
+
- [`ff1c85d`](https://github.com/tobymao/sqlglot/commit/ff1c85d05f90008582582209801e901a2bbbf394) - **teradata**: set NORMALIZATION_STRATEGY to CASE_INSENSITIVE *(PR [#8940](https://github.com/tobymao/sqlglot/pull/8940) by [@EduardoAndradeSLima](https://github.com/EduardoAndradeSLima))*
|
|
31
|
+
- :arrow_lower_right: *fixes issue [#8932](https://github.com/tobymao/sqlglot/issues/8932) opened by [@Bhavaneda](https://github.com/Bhavaneda)*
|
|
32
|
+
- [`5197166`](https://github.com/tobymao/sqlglot/commit/5197166a2aeee4dfd9aa62ed59f9962eb070dead) - **clickhouse**: parenthesize multi-row VALUES relations *(PR [#8943](https://github.com/tobymao/sqlglot/pull/8943) by [@yzhu-liftoff](https://github.com/yzhu-liftoff))*
|
|
33
|
+
- :arrow_lower_right: *fixes issue [#8942](https://github.com/tobymao/sqlglot/issues/8942) opened by [@yzhu-liftoff](https://github.com/yzhu-liftoff)*
|
|
34
|
+
- [`b032279`](https://github.com/tobymao/sqlglot/commit/b0322790534dfcbd51f8d6bba3fb48e6e811e45f) - **postgres**: report unsupported star EXCEPT *(PR [#8933](https://github.com/tobymao/sqlglot/pull/8933) by [@lss680455-create](https://github.com/lss680455-create))*
|
|
35
|
+
- :arrow_lower_right: *fixes issue [#8928](https://github.com/tobymao/sqlglot/issues/8928) opened by [@notlakshitha](https://github.com/notlakshitha)*
|
|
36
|
+
- [`3457400`](https://github.com/tobymao/sqlglot/commit/3457400b5d5a1888fc8b4327c0eab04e4cc989f4) - **redshift**: preserve star exclusion in strict transpilation modes *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
37
|
+
- [`19d1cc7`](https://github.com/tobymao/sqlglot/commit/19d1cc7ea29224cd9adcdbf59bf5dedd6ae5c6d2) - **sqlite**: transpile DATE_SUB to DATE with a negated modifier [CLAUDE] *(PR [#8931](https://github.com/tobymao/sqlglot/pull/8931) by [@dvsnehal](https://github.com/dvsnehal))*
|
|
38
|
+
- [`1300a99`](https://github.com/tobymao/sqlglot/commit/1300a99feb80551fa86d39eb8bed2210188fcb8e) - handle omitted REGEXP_REPLACE replacement *(PR [#8952](https://github.com/tobymao/sqlglot/pull/8952) by [@georgesittas](https://github.com/georgesittas))*
|
|
39
|
+
- :arrow_lower_right: *fixes issue [#8934](https://github.com/tobymao/sqlglot/issues/8934) opened by [@lss680455-create](https://github.com/lss680455-create)*
|
|
40
|
+
- [`5a8f468`](https://github.com/tobymao/sqlglot/commit/5a8f4686b536050a9be0b337be9b55cab26c0cb6) - preserve safe division guards for typed integers *(PR [#8950](https://github.com/tobymao/sqlglot/pull/8950) by [@georgesittas](https://github.com/georgesittas))*
|
|
41
|
+
- :arrow_lower_right: *fixes issue [#8946](https://github.com/tobymao/sqlglot/issues/8946) opened by [@IAMVENEETH](https://github.com/IAMVENEETH)*
|
|
42
|
+
- [`0503702`](https://github.com/tobymao/sqlglot/commit/0503702e2e183483ba6fc581c746f2eaf1ed3d46) - **duckdb**: parse generated INITCAP SQL with the DuckDB dialect [WORKBUDDY] *(PR [#8959](https://github.com/tobymao/sqlglot/pull/8959) by [@inchang-ing](https://github.com/inchang-ing))*
|
|
43
|
+
- :arrow_lower_right: *fixes issue [#8955](https://github.com/tobymao/sqlglot/issues/8955) opened by [@IAMVENEETH](https://github.com/IAMVENEETH)*
|
|
44
|
+
- [`e3963f5`](https://github.com/tobymao/sqlglot/commit/e3963f55bb49a335e23cdfb14f991f0aae4472b4) - **spark**: handle a 0 start and a negative length in SUBSTRING for DuckDB [CLAUDE] *(PR [#8966](https://github.com/tobymao/sqlglot/pull/8966) by [@anishmehta24](https://github.com/anishmehta24))*
|
|
45
|
+
- [`20b1a60`](https://github.com/tobymao/sqlglot/commit/20b1a60c46cd96c08772c4147d0f68bff46667ee) - **optimizer**: preserve source bindings in ORDER BY expressions [CODEX] *(PR [#8951](https://github.com/tobymao/sqlglot/pull/8951) by [@georgesittas](https://github.com/georgesittas))*
|
|
46
|
+
- :arrow_lower_right: *fixes issue [#8927](https://github.com/tobymao/sqlglot/issues/8927) opened by [@AndreMuraro](https://github.com/AndreMuraro)*
|
|
47
|
+
- [`6922013`](https://github.com/tobymao/sqlglot/commit/69220135b19802256402fde01bd34f35034db69d) - **postgres**: preserve omitted REGEXP_REPLACE replacement [CODEX] *(PR [#8969](https://github.com/tobymao/sqlglot/pull/8969) by [@hector2394](https://github.com/hector2394))*
|
|
48
|
+
- :arrow_lower_right: *fixes issue [#8968](https://github.com/tobymao/sqlglot/issues/8968) opened by [@Cyber-Marty](https://github.com/Cyber-Marty)*
|
|
49
|
+
- [`547fee8`](https://github.com/tobymao/sqlglot/commit/547fee896acb63c6bfd13147968a0e564feb45e9) - **optimizer**: don't simplify zoned DATE_TRUNC/TIMESTAMP_TRUNC [CLAUDE] *(PR [#8971](https://github.com/tobymao/sqlglot/pull/8971) by [@talzel](https://github.com/talzel))*
|
|
50
|
+
- :arrow_lower_right: *fixes issue [#8970](https://github.com/tobymao/sqlglot/issues/8970) opened by [@talzel](https://github.com/talzel)*
|
|
51
|
+
- [`7740638`](https://github.com/tobymao/sqlglot/commit/774063800ff49f08a2f3ce459427e717878a66b6) - **schema**: invalidate all cached lookups in MappingSchema.add_table *(PR [#8960](https://github.com/tobymao/sqlglot/pull/8960) by [@zgurung](https://github.com/zgurung))*
|
|
52
|
+
- [`0c1b5ee`](https://github.com/tobymao/sqlglot/commit/0c1b5ee65056ffd90b68705f469b8d36fc459b13) - **generator**: guard modulo by zero when transpiling from safe-division dialects *(PR [#8973](https://github.com/tobymao/sqlglot/pull/8973) by [@georgesittas](https://github.com/georgesittas))*
|
|
53
|
+
- :arrow_lower_right: *fixes issue [#8953](https://github.com/tobymao/sqlglot/issues/8953) opened by [@IAMVENEETH](https://github.com/IAMVENEETH)*
|
|
54
|
+
- [`326acdc`](https://github.com/tobymao/sqlglot/commit/326acdccf40182186bb3cd69f71a63f40c4f5c9d) - **teradata**: preserve nested TITLE function calls *(PR [#8976](https://github.com/tobymao/sqlglot/pull/8976) by [@georgesittas](https://github.com/georgesittas))*
|
|
55
|
+
- [`447a8a8`](https://github.com/tobymao/sqlglot/commit/447a8a8929835a82ead76d7c6d7e104df344ab36) - **optimizer**: resolve outer columns before inner table aliases in postgres *(PR [#8972](https://github.com/tobymao/sqlglot/pull/8972) by [@georgesittas](https://github.com/georgesittas))*
|
|
56
|
+
- :arrow_lower_right: *fixes issue [#8936](https://github.com/tobymao/sqlglot/issues/8936) opened by [@laravioli](https://github.com/laravioli)*
|
|
57
|
+
|
|
58
|
+
### :zap: Performance Improvements
|
|
59
|
+
- [`e0a6385`](https://github.com/tobymao/sqlglot/commit/e0a638553ade104a05f38b5ea94564f462c03a32) - **optimizer**: skip comparison pairs that can never combine in simplify [CLAUDE] *(PR [#8965](https://github.com/tobymao/sqlglot/pull/8965) by [@deadstrobe5](https://github.com/deadstrobe5))*
|
|
60
|
+
|
|
61
|
+
|
|
4
62
|
## [v30.30.0] - 2026-11-06
|
|
5
63
|
### :boom: BREAKING CHANGES
|
|
6
64
|
- due to [`2609055`](https://github.com/tobymao/sqlglot/commit/26090558386544da0932d78945c24ca97e303e31) - respect input column precedence in HAVING and QUALIFY *(PR [#8898](https://github.com/tobymao/sqlglot/pull/8898) by [@georgesittas](https://github.com/georgesittas))*:
|
|
@@ -16651,3 +16709,4 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
16651
16709
|
[v30.27.0]: https://github.com/tobymao/sqlglot/compare/v30.26.0...v30.27.0
|
|
16652
16710
|
[v30.29.0]: https://github.com/tobymao/sqlglot/compare/v30.28.0...v30.29.0
|
|
16653
16711
|
[v30.30.0]: https://github.com/tobymao/sqlglot/compare/v30.29.0...v30.30.0
|
|
16712
|
+
[v30.31.0]: https://github.com/tobymao/sqlglot/compare/v30.30.0...v30.31.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.32.0
|
|
4
4
|
Summary: An easily customizable SQL parser and transpiler
|
|
5
5
|
Author-email: Toby Mao <toby.mao@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -34,10 +34,10 @@ Requires-Dist: types-pytz; extra == "dev"
|
|
|
34
34
|
Requires-Dist: typing_extensions; extra == "dev"
|
|
35
35
|
Requires-Dist: pyperf; extra == "dev"
|
|
36
36
|
Provides-Extra: c
|
|
37
|
-
Requires-Dist: sqlglotc==30.
|
|
37
|
+
Requires-Dist: sqlglotc==30.32.0; python_version >= "3.10" and extra == "c"
|
|
38
38
|
Provides-Extra: rs
|
|
39
39
|
Requires-Dist: sqlglotrs==0.13.0; extra == "rs"
|
|
40
|
-
Requires-Dist: sqlglotc==30.
|
|
40
|
+
Requires-Dist: sqlglotc==30.32.0; python_version >= "3.10" and extra == "rs"
|
|
41
41
|
Dynamic: license-file
|
|
42
42
|
Dynamic: provides-extra
|
|
43
43
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '30.
|
|
22
|
-
__version_tuple__ = version_tuple = (30,
|
|
21
|
+
__version__ = version = '30.32.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 32, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g798a1d772'
|
|
@@ -24,6 +24,14 @@ class ClickHouse(Dialect):
|
|
|
24
24
|
IDENTIFIERS_CAN_START_WITH_DIGIT = True
|
|
25
25
|
HEX_STRING_IS_INTEGER_TYPE = True
|
|
26
26
|
|
|
27
|
+
# https://clickhouse.com/docs/sql-reference/functions/date-time-functions#formatDateTime
|
|
28
|
+
TIME_MAPPING = {
|
|
29
|
+
"%%": "%%",
|
|
30
|
+
"%M": "%B",
|
|
31
|
+
"%i": "%M",
|
|
32
|
+
"%W": "%A",
|
|
33
|
+
}
|
|
34
|
+
|
|
27
35
|
# https://github.com/ClickHouse/ClickHouse/issues/33935#issue-1112165779
|
|
28
36
|
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_SENSITIVE
|
|
29
37
|
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import importlib
|
|
4
4
|
import logging
|
|
5
|
+
import re
|
|
5
6
|
import string
|
|
6
7
|
import typing as t
|
|
7
8
|
import sys
|
|
@@ -1944,10 +1945,10 @@ def build_date_delta(
|
|
|
1944
1945
|
def build_date_delta_with_interval(
|
|
1945
1946
|
expression_class: Type[E],
|
|
1946
1947
|
default_unit: str | None = None,
|
|
1947
|
-
) -> t.Callable[[BuilderArgs], E
|
|
1948
|
-
def _builder(args: BuilderArgs) -> E
|
|
1948
|
+
) -> t.Callable[[BuilderArgs], E]:
|
|
1949
|
+
def _builder(args: BuilderArgs) -> E:
|
|
1949
1950
|
if len(args) < 2:
|
|
1950
|
-
return
|
|
1951
|
+
return expression_class(this=seq_get(args, 0))
|
|
1951
1952
|
|
|
1952
1953
|
interval = args[1]
|
|
1953
1954
|
|
|
@@ -2238,6 +2239,100 @@ def build_trunc(
|
|
|
2238
2239
|
return exp.Anonymous(this="TRUNC", expressions=args)
|
|
2239
2240
|
|
|
2240
2241
|
|
|
2242
|
+
# https://docs.teradata.com/r/Lake-Working-with-SQL/SQL-Functions/SQL-Date-and-Time-Functions-and-Expressions/DateTime-and-Interval-Functions-and-Expressions/TRUNC-Date/TRUNC-Date-Syntax/ROUND-Date-and-TRUNC-Date-Argument-Types-and-Rules/TRUNC-and-ROUND-Date-Formats
|
|
2243
|
+
TRUNC_FORMAT_TO_UNIT = {
|
|
2244
|
+
"CC": "CENTURY",
|
|
2245
|
+
"SCC": "CENTURY",
|
|
2246
|
+
"SYYYY": "YEAR",
|
|
2247
|
+
"SYYY": "YEAR",
|
|
2248
|
+
"YYYY": "YEAR",
|
|
2249
|
+
"YEAR": "YEAR",
|
|
2250
|
+
"SYEAR": "YEAR",
|
|
2251
|
+
"YYY": "YEAR",
|
|
2252
|
+
"YY": "YEAR",
|
|
2253
|
+
"Y": "YEAR",
|
|
2254
|
+
"IYYY": "ISOYEAR",
|
|
2255
|
+
"IYY": "ISOYEAR",
|
|
2256
|
+
"IY": "ISOYEAR",
|
|
2257
|
+
"I": "ISOYEAR",
|
|
2258
|
+
"Q": "QUARTER",
|
|
2259
|
+
"MONTH": "MONTH",
|
|
2260
|
+
"MON": "MONTH",
|
|
2261
|
+
"MM": "MONTH",
|
|
2262
|
+
"RM": "MONTH",
|
|
2263
|
+
"DAY": "WEEK",
|
|
2264
|
+
"DY": "WEEK",
|
|
2265
|
+
"D": "WEEK",
|
|
2266
|
+
"IW": "ISOWEEK",
|
|
2267
|
+
# These weeks are anchored to the first day of the month/year, not a fixed weekday.
|
|
2268
|
+
"W": "WEEK_OF_MONTH",
|
|
2269
|
+
"WW": "WEEK_OF_YEAR",
|
|
2270
|
+
"DDD": "DAY",
|
|
2271
|
+
"DD": "DAY",
|
|
2272
|
+
"J": "DAY",
|
|
2273
|
+
"HH": "HOUR",
|
|
2274
|
+
"HH12": "HOUR",
|
|
2275
|
+
"HH24": "HOUR",
|
|
2276
|
+
"MI": "MINUTE",
|
|
2277
|
+
"SS": "SECOND",
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
def build_formatted_trunc(
|
|
2282
|
+
args: BuilderArgs, dialect: Dialect
|
|
2283
|
+
) -> exp.DateTrunc | exp.Trunc | exp.Anonymous:
|
|
2284
|
+
trunc = build_trunc(args, dialect, date_trunc_unabbreviate=False, default_date_trunc_unit="DD")
|
|
2285
|
+
if isinstance(trunc, exp.DateTrunc) and trunc.unit.is_string:
|
|
2286
|
+
unit = TRUNC_FORMAT_TO_UNIT.get(trunc.unit.name.upper())
|
|
2287
|
+
if unit == "ISOWEEK" or (unit == "WEEK" and dialect.WEEK_OFFSET):
|
|
2288
|
+
start = 1 if unit == "ISOWEEK" else week_offset_to_dow(dialect.WEEK_OFFSET)
|
|
2289
|
+
day = next(day for day, dow in WEEK_START_DAY_TO_DOW.items() if dow == start)
|
|
2290
|
+
trunc.set("unit", exp.WeekStart(this=exp.var(day)))
|
|
2291
|
+
elif unit:
|
|
2292
|
+
trunc.set("unit", exp.Literal.string(unit))
|
|
2293
|
+
return trunc
|
|
2294
|
+
|
|
2295
|
+
|
|
2296
|
+
UNIT_TO_TRUNC_FORMAT = {
|
|
2297
|
+
"CENTURY": "CC",
|
|
2298
|
+
"YEAR": "YEAR",
|
|
2299
|
+
"YY": "YEAR",
|
|
2300
|
+
"YYYY": "YEAR",
|
|
2301
|
+
"ISOYEAR": "IYYY",
|
|
2302
|
+
"QUARTER": "Q",
|
|
2303
|
+
"MONTH": "MONTH",
|
|
2304
|
+
"MM": "MONTH",
|
|
2305
|
+
"MON": "MONTH",
|
|
2306
|
+
"WEEK": "IW",
|
|
2307
|
+
"WEEK_OF_MONTH": "W",
|
|
2308
|
+
"WEEK_OF_YEAR": "WW",
|
|
2309
|
+
"ISOWEEK": "IW",
|
|
2310
|
+
"DAY": "DD",
|
|
2311
|
+
"HOUR": "HH",
|
|
2312
|
+
"MINUTE": "MI",
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
@unsupported_args("zone", "century_from_zero")
|
|
2317
|
+
def date_trunc_to_trunc_sql(self: Generator, expression: exp.DateTrunc) -> str:
|
|
2318
|
+
unit = expression.unit
|
|
2319
|
+
if isinstance(unit, exp.WeekStart):
|
|
2320
|
+
if unit.name.upper() == "MONDAY":
|
|
2321
|
+
unit = exp.Literal.string("IW")
|
|
2322
|
+
else:
|
|
2323
|
+
self.weekstart_name(unit)
|
|
2324
|
+
unit = exp.Literal.string("DAY")
|
|
2325
|
+
elif isinstance(unit, (exp.Literal, exp.Var)):
|
|
2326
|
+
unit_name = unit.name.upper()
|
|
2327
|
+
mapped = UNIT_TO_TRUNC_FORMAT.get(unit_name)
|
|
2328
|
+
if mapped:
|
|
2329
|
+
unit = exp.Literal.string(mapped)
|
|
2330
|
+
else:
|
|
2331
|
+
self.unsupported(f"Unexpected interval unit: {unit_name}")
|
|
2332
|
+
|
|
2333
|
+
return self.func("TRUNC", expression.this, unit)
|
|
2334
|
+
|
|
2335
|
+
|
|
2241
2336
|
def any_value_to_max_sql(self: Generator, expression: exp.AnyValue) -> str:
|
|
2242
2337
|
return self.func("MAX", expression.this)
|
|
2243
2338
|
|
|
@@ -2392,11 +2487,23 @@ def unit_to_str(expression: exp.Expr, default: str = "DAY") -> exp.Expr | None:
|
|
|
2392
2487
|
|
|
2393
2488
|
|
|
2394
2489
|
def weekstart_unit_to_str(
|
|
2395
|
-
self: Generator,
|
|
2490
|
+
self: Generator,
|
|
2491
|
+
expression: exp.Expr,
|
|
2492
|
+
default: str = "DAY",
|
|
2493
|
+
*,
|
|
2494
|
+
century_from_zero: bool = False,
|
|
2396
2495
|
) -> exp.Expr | None:
|
|
2397
2496
|
unit = expression.args.get("unit")
|
|
2398
2497
|
if isinstance(unit, exp.WeekStart):
|
|
2399
2498
|
return exp.Literal.string(self.weekstart_name(unit))
|
|
2499
|
+
if isinstance(unit, exp.Literal) and unit.name.upper() in ("WEEK_OF_MONTH", "WEEK_OF_YEAR"):
|
|
2500
|
+
self.unsupported(f"Unexpected interval unit: {unit.name}")
|
|
2501
|
+
if (
|
|
2502
|
+
isinstance(unit, (exp.Literal, exp.Var))
|
|
2503
|
+
and map_date_part(unit).name.upper() == "CENTURY"
|
|
2504
|
+
and bool(expression.args.get("century_from_zero")) != century_from_zero
|
|
2505
|
+
):
|
|
2506
|
+
self.unsupported("Cannot preserve century boundaries starting at different years")
|
|
2400
2507
|
|
|
2401
2508
|
return unit_to_str(expression, default)
|
|
2402
2509
|
|
|
@@ -2404,7 +2511,7 @@ def weekstart_unit_to_str(
|
|
|
2404
2511
|
def unit_to_var(expression: exp.Expr, default: str = "DAY") -> exp.Expr | None:
|
|
2405
2512
|
unit = expression.args.get("unit")
|
|
2406
2513
|
|
|
2407
|
-
if
|
|
2514
|
+
if unit and not isinstance(unit, exp.Literal):
|
|
2408
2515
|
return unit
|
|
2409
2516
|
|
|
2410
2517
|
value = unit.name if unit else default
|
|
@@ -2771,6 +2878,15 @@ def build_like(expr_type: Type[E], not_like: bool = False) -> t.Callable[[Builde
|
|
|
2771
2878
|
return _builder
|
|
2772
2879
|
|
|
2773
2880
|
|
|
2881
|
+
def regexp_capture_group_count(pattern: exp.Expression | None) -> int | None:
|
|
2882
|
+
if pattern and (pattern.is_string or isinstance(pattern, exp.RawString)):
|
|
2883
|
+
try:
|
|
2884
|
+
return re.compile(pattern.name).groups
|
|
2885
|
+
except re.error:
|
|
2886
|
+
pass
|
|
2887
|
+
return None
|
|
2888
|
+
|
|
2889
|
+
|
|
2774
2890
|
def build_regexp_extract(expr_type: Type[E]) -> t.Callable[[BuilderArgs, Dialect], E]:
|
|
2775
2891
|
def _builder(args: BuilderArgs, dialect: Dialect) -> E:
|
|
2776
2892
|
# The "position" argument specifies the index of the string character to start matching from.
|
|
@@ -2793,7 +2909,9 @@ def build_regexp_extract(expr_type: Type[E]) -> t.Callable[[BuilderArgs, Dialect
|
|
|
2793
2909
|
return _builder
|
|
2794
2910
|
|
|
2795
2911
|
|
|
2796
|
-
def explode_to_unnest_sql(
|
|
2912
|
+
def explode_to_unnest_sql(
|
|
2913
|
+
self: Generator, expression: exp.Lateral, supports_left_join_unnest: bool = True
|
|
2914
|
+
) -> str:
|
|
2797
2915
|
this = expression.this
|
|
2798
2916
|
alias = expression.args.get("alias")
|
|
2799
2917
|
|
|
@@ -2826,6 +2944,10 @@ def explode_to_unnest_sql(self: Generator, expression: exp.Lateral) -> str:
|
|
|
2826
2944
|
)
|
|
2827
2945
|
|
|
2828
2946
|
if cross_join_expr:
|
|
2947
|
+
if expression.args.get("outer") or isinstance(this, exp.ExplodeOuter):
|
|
2948
|
+
if supports_left_join_unnest:
|
|
2949
|
+
return self.sql(exp.Join(this=cross_join_expr, side="LEFT", on=exp.true()))
|
|
2950
|
+
self.unsupported("LEFT JOIN UNNEST is not supported, NULL or empty arrays are dropped")
|
|
2829
2951
|
return self.sql(exp.Join(this=cross_join_expr, kind="cross"))
|
|
2830
2952
|
|
|
2831
2953
|
return self.lateral_sql(expression)
|
|
@@ -14,6 +14,8 @@ from sqlglot.tokens import TokenType
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Oracle(Dialect):
|
|
17
|
+
# Assume NLS_TERRITORY = 'AMERICA' for the DAY, DY and D truncation formats.
|
|
18
|
+
WEEK_OFFSET = -1
|
|
17
19
|
ALIAS_POST_TABLESAMPLE = True
|
|
18
20
|
LOCKING_READS_SUPPORTED = True
|
|
19
21
|
TABLESAMPLE_SIZE_IS_PERCENT = True
|
|
@@ -8,6 +8,8 @@ from sqlglot.tokens import TokenType
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Teradata(Dialect):
|
|
11
|
+
# Teradata's 'DAY' TRUNC format starts the week on Sunday by default
|
|
12
|
+
WEEK_OFFSET = -1
|
|
11
13
|
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_INSENSITIVE
|
|
12
14
|
TYPED_DIVISION = True
|
|
13
15
|
|
|
@@ -50,7 +52,7 @@ class Teradata(Dialect):
|
|
|
50
52
|
**tokens.Tokenizer.KEYWORDS,
|
|
51
53
|
"**": TokenType.DSTAR,
|
|
52
54
|
"^=": TokenType.NEQ,
|
|
53
|
-
"BYTEINT": TokenType.
|
|
55
|
+
"BYTEINT": TokenType.TINYINT,
|
|
54
56
|
"COLLECT": TokenType.COMMAND,
|
|
55
57
|
"DEL": TokenType.DELETE,
|
|
56
58
|
"EQ": TokenType.EQ,
|
|
@@ -138,7 +138,12 @@ class FirstValue(Expression, AggFunc):
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
class GroupConcat(Expression, AggFunc):
|
|
141
|
-
arg_types = {
|
|
141
|
+
arg_types = {
|
|
142
|
+
"this": True,
|
|
143
|
+
"separator": False,
|
|
144
|
+
"on_overflow": False,
|
|
145
|
+
"null_separator_is_empty": False,
|
|
146
|
+
}
|
|
142
147
|
|
|
143
148
|
|
|
144
149
|
class Grouping(Expression, AggFunc):
|
|
@@ -322,6 +327,8 @@ class Sum(Expression, AggFunc):
|
|
|
322
327
|
|
|
323
328
|
|
|
324
329
|
class Variance(Expression, AggFunc):
|
|
330
|
+
# single_value_returns_zero: Oracle's VARIANCE returns 0 instead of NULL for a single value
|
|
331
|
+
arg_types = {"this": True, "single_value_returns_zero": False}
|
|
325
332
|
_sql_names = ["VARIANCE", "VARIANCE_SAMP", "VAR_SAMP"]
|
|
326
333
|
|
|
327
334
|
|
|
@@ -46,6 +46,7 @@ TABLE_PARTS = ("this", "db", "catalog")
|
|
|
46
46
|
COLUMN_PARTS = ("this", "table", "db", "catalog")
|
|
47
47
|
POSITION_META_KEYS: tuple[str, ...] = ("line", "col", "start", "end")
|
|
48
48
|
UNITTEST: bool = "unittest" in sys.modules or "pytest" in sys.modules
|
|
49
|
+
_IMMUTABLE_META_TYPES: frozenset[type] = frozenset((int, str, bool, float, type(None)))
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
@trait
|
|
@@ -1014,7 +1015,11 @@ class Expression(Expr):
|
|
|
1014
1015
|
if node._type is not None:
|
|
1015
1016
|
copy._type = deepcopy(node._type)
|
|
1016
1017
|
if node._meta is not None:
|
|
1017
|
-
|
|
1018
|
+
# Positions and flags are immutable, so only other values need a deep copy
|
|
1019
|
+
meta = copy._meta = dict(node._meta)
|
|
1020
|
+
for k, v in meta.items():
|
|
1021
|
+
if type(v) not in _IMMUTABLE_META_TYPES:
|
|
1022
|
+
meta[k] = deepcopy(v)
|
|
1018
1023
|
if node._hash is not None:
|
|
1019
1024
|
copy._hash = node._hash
|
|
1020
1025
|
|
|
@@ -2289,6 +2294,10 @@ class Paren(Unary):
|
|
|
2289
2294
|
return self.this.name
|
|
2290
2295
|
|
|
2291
2296
|
|
|
2297
|
+
class Pos(Unary):
|
|
2298
|
+
pass
|
|
2299
|
+
|
|
2300
|
+
|
|
2292
2301
|
class Neg(Unary):
|
|
2293
2302
|
def to_py(self) -> int | Decimal:
|
|
2294
2303
|
if self.is_number:
|
|
@@ -2301,7 +2310,8 @@ class AtIndex(Expression):
|
|
|
2301
2310
|
|
|
2302
2311
|
|
|
2303
2312
|
class AtTimeZone(Expression):
|
|
2304
|
-
|
|
2313
|
+
# session_zone: a zoneless operand is read in the session time zone (e.g. Presto, Trino)
|
|
2314
|
+
arg_types = {"this": True, "zone": True, "session_zone": False}
|
|
2305
2315
|
|
|
2306
2316
|
|
|
2307
2317
|
class FromTimeZone(Expression):
|
|
@@ -2340,6 +2350,12 @@ class TeradataTitle(Expression):
|
|
|
2340
2350
|
return self.this.output_name
|
|
2341
2351
|
|
|
2342
2352
|
|
|
2353
|
+
class TeradataNamed(Alias):
|
|
2354
|
+
"""A Teradata NAMED alias on a subexpression; projections use ordinary Alias."""
|
|
2355
|
+
|
|
2356
|
+
arg_types = {"this": True, "alias": True}
|
|
2357
|
+
|
|
2358
|
+
|
|
2343
2359
|
class Between(Expression, Predicate):
|
|
2344
2360
|
arg_types = {"this": True, "low": True, "high": True, "symmetric": False}
|
|
2345
2361
|
|
|
@@ -493,7 +493,9 @@ class BitString(Expression, Condition):
|
|
|
493
493
|
|
|
494
494
|
|
|
495
495
|
class HexString(Expression, Condition):
|
|
496
|
-
|
|
496
|
+
"""Encoded hexadecimal data, binary by default or integer/character when flagged."""
|
|
497
|
+
|
|
498
|
+
arg_types = {"this": True, "is_integer": False, "is_character": False}
|
|
497
499
|
is_primitive = True
|
|
498
500
|
|
|
499
501
|
|
|
@@ -706,6 +708,8 @@ class Join(Expression):
|
|
|
706
708
|
"pivots": False,
|
|
707
709
|
}
|
|
708
710
|
|
|
711
|
+
QUALIFIERS: t.ClassVar[tuple[str, ...]] = ("on", "using", "side", "kind", "method", "nearest")
|
|
712
|
+
|
|
709
713
|
@property
|
|
710
714
|
def method(self) -> str:
|
|
711
715
|
return self.text("method").upper()
|
|
@@ -1489,7 +1493,10 @@ class Select(Expression, Query):
|
|
|
1489
1493
|
except ParseError:
|
|
1490
1494
|
expression = maybe_parse(expression, into=(Join, Expr), **parse_args)
|
|
1491
1495
|
|
|
1492
|
-
join = expression if isinstance(expression, Join) else Join(this=expression)
|
|
1496
|
+
join = expression if isinstance(expression, Join) else Join(this=expression, kind="CROSS")
|
|
1497
|
+
|
|
1498
|
+
if join.kind == "CROSS" and (on or using or join_type):
|
|
1499
|
+
join.set("kind", None)
|
|
1493
1500
|
|
|
1494
1501
|
if isinstance(join.this, Select):
|
|
1495
1502
|
join.this.replace(join.this.subquery())
|
|
@@ -438,6 +438,7 @@ class RegexpExtract(Expression, Func):
|
|
|
438
438
|
"null_if_pos_overflow": False,
|
|
439
439
|
"null_if_no_match": False,
|
|
440
440
|
"empty_if_group_missing": False,
|
|
441
|
+
"inferred_group": False,
|
|
441
442
|
}
|
|
442
443
|
|
|
443
444
|
|
|
@@ -449,6 +450,7 @@ class RegexpExtractAll(Expression, Func):
|
|
|
449
450
|
"parameters": False,
|
|
450
451
|
"position": False,
|
|
451
452
|
"occurrence": False,
|
|
453
|
+
"inferred_group": False,
|
|
452
454
|
}
|
|
453
455
|
|
|
454
456
|
|
|
@@ -135,7 +135,7 @@ class TimestampAdd(Expression, Func, TimeUnit):
|
|
|
135
135
|
|
|
136
136
|
class TimestampDiff(Expression, Func, TimeUnit):
|
|
137
137
|
_sql_names = ["TIMESTAMPDIFF", "TIMESTAMP_DIFF"]
|
|
138
|
-
arg_types = {"this": True, "expression": True, "unit": False}
|
|
138
|
+
arg_types = {"this": True, "expression": True, "unit": False, "boundary_for_date": False}
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
class TimestampSub(Expression, Func, TimeUnit):
|
|
@@ -163,7 +163,13 @@ class DatetimeTrunc(Expression, Func, TimeUnit):
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
class DateTrunc(Expression, Func):
|
|
166
|
-
arg_types = {
|
|
166
|
+
arg_types = {
|
|
167
|
+
"unit": True,
|
|
168
|
+
"this": True,
|
|
169
|
+
"zone": False,
|
|
170
|
+
"input_type_preserved": False,
|
|
171
|
+
"century_from_zero": False,
|
|
172
|
+
}
|
|
167
173
|
|
|
168
174
|
def __init__(self, **args):
|
|
169
175
|
# Across most dialects it's safe to unabbreviate the unit (e.g. 'Q' -> 'QUARTER') except Oracle
|
|
@@ -188,7 +194,13 @@ class DateTrunc(Expression, Func):
|
|
|
188
194
|
|
|
189
195
|
|
|
190
196
|
class TimestampTrunc(Expression, Func, TimeUnit):
|
|
191
|
-
arg_types = {
|
|
197
|
+
arg_types = {
|
|
198
|
+
"this": True,
|
|
199
|
+
"unit": True,
|
|
200
|
+
"zone": False,
|
|
201
|
+
"input_type_preserved": False,
|
|
202
|
+
"century_from_zero": False,
|
|
203
|
+
}
|
|
192
204
|
|
|
193
205
|
|
|
194
206
|
class TimeSlice(Expression, Func, TimeUnit):
|