sqlglot 30.34.0__tar.gz → 30.36.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.34.0 → sqlglot-30.36.0}/CHANGELOG.md +167 -0
- {sqlglot-30.34.0/sqlglot.egg-info → sqlglot-30.36.0}/PKG-INFO +8 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/README.md +5 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/athena.py +4 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/clickhouse.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/dialect.py +59 -13
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/doris.py +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/dremio.py +8 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/duckdb.py +23 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/hive.py +12 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/materialize.py +10 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/mysql.py +1 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/postgres.py +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/presto.py +6 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/redshift.py +12 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/risingwave.py +10 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/snowflake.py +1 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/spark.py +1 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/spark2.py +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/sqlite.py +5 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/trino.py +9 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/__init__.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/aggregate.py +2 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/array.py +10 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/core.py +4 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/datatypes.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/ddl.py +4 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/functions.py +4 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/query.py +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/temporal.py +10 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generator.py +77 -16
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/athena.py +3 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/bigquery.py +113 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/clickhouse.py +6 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/databricks.py +3 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/doris.py +59 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/duckdb.py +9 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/exasol.py +3 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/hive.py +1 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/mysql.py +2 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/postgres.py +20 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/presto.py +6 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/redshift.py +2 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/snowflake.py +4 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/spark.py +43 -17
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/spark2.py +0 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/sqlite.py +159 -44
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/teradata.py +1 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/trino.py +48 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/tsql.py +36 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/annotate_types.py +16 -6
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/eliminate_ctes.py +5 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/eliminate_subqueries.py +7 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/helpers.py +14 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/merge_subqueries.py +31 -8
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/pushdown_predicates.py +8 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/pushdown_projections.py +11 -5
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/qualify_columns.py +65 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/scope.py +17 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/simplify.py +5 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/unnest_subqueries.py +125 -51
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parser.py +215 -60
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/athena.py +3 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/base.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/bigquery.py +24 -14
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/clickhouse.py +14 -29
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/databricks.py +7 -7
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/doris.py +14 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/duckdb.py +8 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/exasol.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/materialize.py +5 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/oracle.py +9 -5
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/postgres.py +22 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/redshift.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/risingwave.py +7 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/snowflake.py +5 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/spark.py +6 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/spark2.py +14 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/trino.py +37 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/tokenizer_core.py +17 -29
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/tokens.py +9 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/transforms.py +68 -16
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/__init__.py +38 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/bigquery.py +21 -0
- sqlglot-30.36.0/sqlglot/typing/dremio.py +30 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/duckdb.py +7 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/hive.py +2 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/postgres.py +8 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/presto.py +2 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/spark2.py +2 -0
- sqlglot-30.36.0/sqlglot/typing/sqlite.py +32 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0/sqlglot.egg-info}/PKG-INFO +8 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.egg-info/SOURCES.txt +1 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.egg-info/scm_file_list.json +1 -0
- sqlglot-30.36.0/sqlglot.egg-info/scm_version.json +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_athena.py +9 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_bigquery.py +254 -7
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_clickhouse.py +35 -6
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_databricks.py +63 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_dialect.py +21 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_doris.py +108 -9
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_duckdb.py +60 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_materialize.py +4 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_oracle.py +34 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_postgres.py +84 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_redshift.py +27 -1
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_risingwave.py +6 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_snowflake.py +30 -8
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_spark.py +19 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_sqlite.py +92 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_trino.py +128 -2
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_tsql.py +89 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/annotate_functions.sql +4 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/merge_subqueries.sql +47 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/optimizer.sql +19 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/pushdown_predicates.sql +9 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/pushdown_projections.sql +8 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/qualify_columns.sql +29 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +3 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/simplify.sql +21 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +66 -90
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/unnest_subqueries.sql +118 -3
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_build.py +3 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_lineage.py +9 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_optimizer.py +114 -6
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_parser.py +1 -1
- sqlglot-30.34.0/sqlglot/typing/sqlite.py +0 -9
- sqlglot-30.34.0/sqlglot.egg-info/scm_version.json +0 -8
- {sqlglot-30.34.0 → sqlglot-30.36.0}/.gitignore +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/.gitmodules +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/.gitpod.yml +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/AGENTS.md +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/CLAUDE.md +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/LICENSE +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/MANIFEST.in +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/Makefile +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/pyproject.toml +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/setup.cfg +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/setup.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/anonymize.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/dax.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/expressions/string.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/dax.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/journal.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/dax.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/hive.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/presto.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/time.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/databricks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/snowflake.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglot.png +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/sqlglotc/setup.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_dax.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_mysql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_presto.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/helpers.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_anonymize.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_diff.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_docs.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_errors.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_executor.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_generator.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_helper.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_optimize_cross_joins.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_schema.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_serde.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_simplify_between.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_sqlglotc.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_time.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_transpile.py +0 -0
- {sqlglot-30.34.0 → sqlglot-30.36.0}/tests/test_typing.py +0 -0
|
@@ -1,6 +1,171 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.35.0] - 2026-11-24
|
|
5
|
+
### :sparkles: New Features
|
|
6
|
+
- [`aea3182`](https://github.com/tobymao/sqlglot/commit/aea31829266585a4cf3881801af958f3f84cf71d) - **trino**: support EXECUTE IMMEDIATE *(PR [#9345](https://github.com/tobymao/sqlglot/pull/9345) by [@georgesittas](https://github.com/georgesittas))*
|
|
7
|
+
|
|
8
|
+
### :bug: Bug Fixes
|
|
9
|
+
- [`eb35161`](https://github.com/tobymao/sqlglot/commit/eb351618c1227967d54bc6257495c6c4ae44d8ea) - Add support for BigQuery ST_GEOGPOINT geography type *(PR [#9335](https://github.com/tobymao/sqlglot/pull/9335) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
10
|
+
- [`7ca4a44`](https://github.com/tobymao/sqlglot/commit/7ca4a44abee05c1a9f679fa36313eeaf84c79e9c) - **optimizer**: dialect-aware integer literal typing for trino + presto + athena *(PR [#9278](https://github.com/tobymao/sqlglot/pull/9278) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
11
|
+
- [`54f9d5d`](https://github.com/tobymao/sqlglot/commit/54f9d5d6ec17f91a79322cc41891d7fc4787a758) - **bigquery**: parse TABLE arguments in table function calls [CODEX] *(PR [#9291](https://github.com/tobymao/sqlglot/pull/9291) by [@georgesittas](https://github.com/georgesittas))*
|
|
12
|
+
- :arrow_lower_right: *fixes issue [#9275](https://github.com/tobymao/sqlglot/issues/9275) opened by [@mazum21](https://github.com/mazum21)*
|
|
13
|
+
- [`17fd48f`](https://github.com/tobymao/sqlglot/commit/17fd48f5a2ade9838187be1dd7662604b040be8f) - **bigquery**: preserve null ordering in value windows *(PR [#9323](https://github.com/tobymao/sqlglot/pull/9323) by [@georgesittas](https://github.com/georgesittas))*
|
|
14
|
+
- :arrow_lower_right: *fixes issue [#9309](https://github.com/tobymao/sqlglot/issues/9309) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
15
|
+
- [`8c054a7`](https://github.com/tobymao/sqlglot/commit/8c054a7a83fd4ca68bd9578b55eabb0ba1c0fd0b) - **bigquery**: add and subtract WEEK and longer units on a TIMESTAMP through DATETIME *(PR [#9334](https://github.com/tobymao/sqlglot/pull/9334) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
16
|
+
- [`a4db5e7`](https://github.com/tobymao/sqlglot/commit/a4db5e7f17472f18bb6008265d5e71f368bd024a) - **clickhouse**: resolve forward projection aliases [CODEX] *(PR [#9328](https://github.com/tobymao/sqlglot/pull/9328) by [@georgesittas](https://github.com/georgesittas))*
|
|
17
|
+
- :arrow_lower_right: *fixes issue [#9277](https://github.com/tobymao/sqlglot/issues/9277) opened by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog)*
|
|
18
|
+
- [`7576807`](https://github.com/tobymao/sqlglot/commit/7576807fa36163b3f2e52921bbd2ce7c4da6f197) - **expressions**: preserve IS NOT predicates in the expression builder [CODEX] *(PR [#9340](https://github.com/tobymao/sqlglot/pull/9340) by [@georgesittas](https://github.com/georgesittas))*
|
|
19
|
+
- :arrow_lower_right: *fixes issue [#9338](https://github.com/tobymao/sqlglot/issues/9338) opened by [@travishofmeister](https://github.com/travishofmeister)*
|
|
20
|
+
- [`b39bf82`](https://github.com/tobymao/sqlglot/commit/b39bf8268faf4752d0a95b5e474c596a933ea333) - **snowflake**: keep ALTER SESSION parameters unquoted *(PR [#9337](https://github.com/tobymao/sqlglot/pull/9337) by [@treysp](https://github.com/treysp))*
|
|
21
|
+
- :arrow_lower_right: *fixes issue [#9336](https://github.com/tobymao/sqlglot/issues/9336) opened by [@mday-io](https://github.com/mday-io)*
|
|
22
|
+
- [`e998e87`](https://github.com/tobymao/sqlglot/commit/e998e87ad3296e95e964b24ecd5f82c3727bac41) - **bigquery**: infer the return type of one-argument DATETIME *(PR [#9343](https://github.com/tobymao/sqlglot/pull/9343) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
23
|
+
- [`e14b510`](https://github.com/tobymao/sqlglot/commit/e14b510233aa95c607cd2b892cc8ff114cc249b2) - **bigquery**: translate ISO week and year extraction *(PR [#9344](https://github.com/tobymao/sqlglot/pull/9344) by [@treysp](https://github.com/treysp))*
|
|
24
|
+
- :arrow_lower_right: *fixes issue [#9341](https://github.com/tobymao/sqlglot/issues/9341) opened by [@tushar-mahalya](https://github.com/tushar-mahalya)*
|
|
25
|
+
- [`324cdef`](https://github.com/tobymao/sqlglot/commit/324cdefc4abf291f997c8b241f40c0f5444896a5) - **trino**: preserve trailing comments on EXECUTE commands *(PR [#9346](https://github.com/tobymao/sqlglot/pull/9346) by [@georgesittas](https://github.com/georgesittas))*
|
|
26
|
+
|
|
27
|
+
### :wrench: Chores
|
|
28
|
+
- [`5f34117`](https://github.com/tobymao/sqlglot/commit/5f341179474af86926b86306737b135b63ef1a66) - bump integration tests to the merged BigQuery DATETIME fixtures *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [v30.34.0] - 2026-11-23
|
|
32
|
+
### :boom: BREAKING CHANGES
|
|
33
|
+
- due to [`534375c`](https://github.com/tobymao/sqlglot/commit/534375c62cffff607953f7ca69f4a5d6ad74e7be) - preserve inferred result types when simplifying conditionals [CODEX] *(PR [#9231](https://github.com/tobymao/sqlglot/pull/9231) by [@georgesittas](https://github.com/georgesittas))*:
|
|
34
|
+
|
|
35
|
+
preserve inferred result types when simplifying conditionals [CODEX] (#9231)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### :sparkles: New Features
|
|
39
|
+
- [`8966e17`](https://github.com/tobymao/sqlglot/commit/8966e17169eca9d5fab65b5e608b1feee7e76e3a) - **mysql**: add FIND_IN_SET function support *(PR [#9192](https://github.com/tobymao/sqlglot/pull/9192) by [@gouruprakarsha-pixel](https://github.com/gouruprakarsha-pixel))*
|
|
40
|
+
- [`a59724c`](https://github.com/tobymao/sqlglot/commit/a59724cdf3a05f061e4faceae3f28ba59b9e28b7) - **databricks**: support MERGE WITH SCHEMA EVOLUTION [CODEX] *(PR [#9195](https://github.com/tobymao/sqlglot/pull/9195) by [@Walkeer](https://github.com/Walkeer))*
|
|
41
|
+
- [`c08ee70`](https://github.com/tobymao/sqlglot/commit/c08ee7092b4f66bf81e5d028d088731224d3ce7a) - **teradata**: parse integer postfix casts [CODEX] *(PR [#9198](https://github.com/tobymao/sqlglot/pull/9198) by [@Walkeer](https://github.com/Walkeer))*
|
|
42
|
+
- [`7891fa2`](https://github.com/tobymao/sqlglot/commit/7891fa2aafa0c6c938a2859fe7b340bbedb0d47d) - **databricks**: support FULL, WHERE, and ZORDER BY in OPTIMIZE [CODEX] *(PR [#9229](https://github.com/tobymao/sqlglot/pull/9229) by [@georgesittas](https://github.com/georgesittas))*
|
|
43
|
+
- [`f843832`](https://github.com/tobymao/sqlglot/commit/f8438321ae8632b7a40160601e7b429ea6f3f693) - **duckdb**: parse LIST_INTERSECT and LIST_SLICE as ArrayIntersect and ArraySlice *(PR [#9232](https://github.com/tobymao/sqlglot/pull/9232) by [@pellurusaranya-byte](https://github.com/pellurusaranya-byte))*
|
|
44
|
+
- [`8630c15`](https://github.com/tobymao/sqlglot/commit/8630c15bfbb4b6d6a77895375da50d605be2cc9d) - **bigquery**: infer FLOAT64 for ST_X and ST_Y *(PR [#9268](https://github.com/tobymao/sqlglot/pull/9268) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
45
|
+
- [`b5bd9ff`](https://github.com/tobymao/sqlglot/commit/b5bd9ff50aaec1679a0866a946655cb0f6770362) - **Bigquery**: Add fix for BigQuery trunc return type *(PR [#9294](https://github.com/tobymao/sqlglot/pull/9294) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
46
|
+
- [`09a454d`](https://github.com/tobymao/sqlglot/commit/09a454dde013bfcbe372a87875e57dbaafb598ba) - **sqlite**: support ON CONFLICT constraint modifier *(PR [#9292](https://github.com/tobymao/sqlglot/pull/9292) by [@treysp](https://github.com/treysp))*
|
|
47
|
+
- :arrow_lower_right: *addresses issue [#9282](https://github.com/tobymao/sqlglot/issues/9282) opened by [@InnoxCodes](https://github.com/InnoxCodes)*
|
|
48
|
+
- [`dab55c1`](https://github.com/tobymao/sqlglot/commit/dab55c101e7f4cc7fc2b1b4ce4c5e20012d9a600) - **Bigquery**: Add fix for BQ STRUCT dot fields *(PR [#9298](https://github.com/tobymao/sqlglot/pull/9298) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
49
|
+
|
|
50
|
+
### :bug: Bug Fixes
|
|
51
|
+
- [`7962de2`](https://github.com/tobymao/sqlglot/commit/7962de2e18350a90a4f0ea97ab65cc41e02f20bc) - preserve SQLite integer literal division *(PR [#9180](https://github.com/tobymao/sqlglot/pull/9180) by [@hemtilva](https://github.com/hemtilva))*
|
|
52
|
+
- :arrow_lower_right: *fixes issue [#9179](https://github.com/tobymao/sqlglot/issues/9179) opened by [@hemtilva](https://github.com/hemtilva)*
|
|
53
|
+
- [`2f73bdb`](https://github.com/tobymao/sqlglot/commit/2f73bdbce88711e502d9d319641bfb1d39a396e1) - **sqlite**: preserve fractional seconds in strftime formats *(PR [#9178](https://github.com/tobymao/sqlglot/pull/9178) by [@georgesittas](https://github.com/georgesittas))*
|
|
54
|
+
- :arrow_lower_right: *fixes issue [#9178](https://github.com/tobymao/sqlglot/issues/9178) opened by [@hemtilva](https://github.com/hemtilva)*
|
|
55
|
+
- [`709b6c0`](https://github.com/tobymao/sqlglot/commit/709b6c0f58b38a5561ae5ebbebbacfa787f480be) - **sqlite**: preserve NUL-terminated LENGTH in DuckDB *(PR [#9182](https://github.com/tobymao/sqlglot/pull/9182) by [@vanshbarfiwala-lgtm](https://github.com/vanshbarfiwala-lgtm))*
|
|
56
|
+
- :arrow_lower_right: *fixes issue [#9181](https://github.com/tobymao/sqlglot/issues/9181) opened by [@vanshbarfiwala-lgtm](https://github.com/vanshbarfiwala-lgtm)*
|
|
57
|
+
- [`48871a3`](https://github.com/tobymao/sqlglot/commit/48871a3ba46d8450bf0ffad879774299f8bfe76a) - **sqlite**: preserve character length across dialects *(PR [#9183](https://github.com/tobymao/sqlglot/pull/9183) by [@georgesittas](https://github.com/georgesittas))*
|
|
58
|
+
- [`3721a79`](https://github.com/tobymao/sqlglot/commit/3721a79d71d7f7b4dd3c8f08e56fbe527d45eb5b) - **parser**: preserve comments after dots in table names *(PR [#9186](https://github.com/tobymao/sqlglot/pull/9186) by [@georgesittas](https://github.com/georgesittas))*
|
|
59
|
+
- [`eb11aec`](https://github.com/tobymao/sqlglot/commit/eb11aec4be8cb2122afe713a4816662c3f0fb2fa) - **sqlite**: parse variadic IIF and IF calls [CODEX] *(PR [#9187](https://github.com/tobymao/sqlglot/pull/9187) by [@prathamchoksi](https://github.com/prathamchoksi))*
|
|
60
|
+
- [`c62f4d6`](https://github.com/tobymao/sqlglot/commit/c62f4d6c0872432466d7c78f618c16e880b17329) - **snowflake**: support CREATE HYBRID TABLE parsing *(PR [#9191](https://github.com/tobymao/sqlglot/pull/9191) by [@mattiethecat](https://github.com/mattiethecat))*
|
|
61
|
+
- [`d30884d`](https://github.com/tobymao/sqlglot/commit/d30884dc8521cf1f612ec37604b5091f78d37b30) - **optimizer**: unnest membership in WHERE CASE conditions [CODEX] *(PR [#9193](https://github.com/tobymao/sqlglot/pull/9193) by [@georgesittas](https://github.com/georgesittas))*
|
|
62
|
+
- :arrow_lower_right: *fixes issue [#9190](https://github.com/tobymao/sqlglot/issues/9190) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
63
|
+
- [`f36da3f`](https://github.com/tobymao/sqlglot/commit/f36da3fa8c02bdd66fd1b9a04aadae923eb96bfa) - **dialect**: warn when TRY_CAST falls back to a lossy CAST *(PR [#9197](https://github.com/tobymao/sqlglot/pull/9197) by [@saanvimundra](https://github.com/saanvimundra))*
|
|
64
|
+
- :arrow_lower_right: *fixes issue [#9196](https://github.com/tobymao/sqlglot/issues/9196) opened by [@saanvimundra](https://github.com/saanvimundra)*
|
|
65
|
+
- [`b4babf3`](https://github.com/tobymao/sqlglot/commit/b4babf3a77de205a0ed39c5781754b355c39fd02) - **duckdb**: preserve column qualifiers in PIVOT sources [CODEX] *(PR [#9201](https://github.com/tobymao/sqlglot/pull/9201) by [@CarlosRicGuerrero](https://github.com/CarlosRicGuerrero))*
|
|
66
|
+
- [`7398909`](https://github.com/tobymao/sqlglot/commit/7398909ffaf3e84ca46e2d22fa6080daae1f1bdd) - **postgres**: parse CARDINALITY as ArraySize [CLAUDE] *(PR [#9200](https://github.com/tobymao/sqlglot/pull/9200) by [@DilinaSasmitha97](https://github.com/DilinaSasmitha97))*
|
|
67
|
+
- [`83622a5`](https://github.com/tobymao/sqlglot/commit/83622a5303e3bd707f03fd2ea5cf5656963eed84) - **sqlite**: treat negative LIMIT as no limit [CLAUDE] *(PR [#9207](https://github.com/tobymao/sqlglot/pull/9207) by [@EnesSoydan](https://github.com/EnesSoydan))*
|
|
68
|
+
- :arrow_lower_right: *fixes issue [#9206](https://github.com/tobymao/sqlglot/issues/9206) opened by [@EnesSoydan](https://github.com/EnesSoydan)*
|
|
69
|
+
- [`3ce7c4f`](https://github.com/tobymao/sqlglot/commit/3ce7c4f8b2486f0d59d76bd0f54c72fbbf60e813) - **optimizer**: infer element types for lateral EXPLODE aliases *(PR [#9203](https://github.com/tobymao/sqlglot/pull/9203) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
70
|
+
- [`4441feb`](https://github.com/tobymao/sqlglot/commit/4441feb979ebd62913ce481a66b50bcdc20961e5) - **exasol**: support HASHTYPE data types *(PR [#9209](https://github.com/tobymao/sqlglot/pull/9209) by [@tanmay-satija](https://github.com/tanmay-satija))*
|
|
71
|
+
- :arrow_lower_right: *fixes issue [#9199](https://github.com/tobymao/sqlglot/issues/9199) opened by [@Hfuegl](https://github.com/Hfuegl)*
|
|
72
|
+
- [`947af87`](https://github.com/tobymao/sqlglot/commit/947af8722fa3eff4e45549d452177c97db0a6aa0) - **postgres**: parse and generate MAKE_DATE as DateFromParts *(PR [#9213](https://github.com/tobymao/sqlglot/pull/9213) by [@DilinaSasmitha97](https://github.com/DilinaSasmitha97))*
|
|
73
|
+
- [`87bb5d3`](https://github.com/tobymao/sqlglot/commit/87bb5d3d7e06a934e72f72041abc8314a42be7fb) - **presto**: transpile ADD_MONTHS to DATE_ADD *(PR [#9208](https://github.com/tobymao/sqlglot/pull/9208) by [@ashwanth-12](https://github.com/ashwanth-12))*
|
|
74
|
+
- [`6bc660f`](https://github.com/tobymao/sqlglot/commit/6bc660fdb74837c098892a11c8558883328bf2ad) - **mysql**: parse MID as Substring *(PR [#9215](https://github.com/tobymao/sqlglot/pull/9215) by [@shivangithaker-0510](https://github.com/shivangithaker-0510))*
|
|
75
|
+
- [`32fa2f1`](https://github.com/tobymao/sqlglot/commit/32fa2f1a12adfd97efb196d4d866fcf878b88eaa) - **postgres**: return an empty string for a negative LEFT/RIGHT length *(PR [#9219](https://github.com/tobymao/sqlglot/pull/9219) by [@GOUTHAM018-MAKER](https://github.com/GOUTHAM018-MAKER))*
|
|
76
|
+
- [`9359d41`](https://github.com/tobymao/sqlglot/commit/9359d41541ba83ab66d3acf16dec3f899cfcd741) - **duckdb**: transpile SQL-standard SIMILAR TO patterns to DuckDB *(PR [#9212](https://github.com/tobymao/sqlglot/pull/9212) by [@Divisht10](https://github.com/Divisht10))*
|
|
77
|
+
- :arrow_lower_right: *fixes issue [#9211](https://github.com/tobymao/sqlglot/issues/9211) opened by [@Divisht10](https://github.com/Divisht10)*
|
|
78
|
+
- [`d4f68af`](https://github.com/tobymao/sqlglot/commit/d4f68af87f9f238f269fc470c2860dc1d0caffde) - **sqlite**: parse 'now' as the current date/timestamp [CLAUDE] *(PR [#9222](https://github.com/tobymao/sqlglot/pull/9222) by [@EnesSoydan](https://github.com/EnesSoydan))*
|
|
79
|
+
- :arrow_lower_right: *fixes issue [#9221](https://github.com/tobymao/sqlglot/issues/9221) opened by [@EnesSoydan](https://github.com/EnesSoydan)*
|
|
80
|
+
- [`b94427d`](https://github.com/tobymao/sqlglot/commit/b94427dab0a9affa4b3ce6377379006e1be90a37) - **bigquery**: fold ARRAY_SORT and ARRAY_DISTINCT over a filtered ARRAY_AGG *(PR [#9217](https://github.com/tobymao/sqlglot/pull/9217) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
81
|
+
- [`cce3935`](https://github.com/tobymao/sqlglot/commit/cce39351f339f2f684e9925b8afbc7caafbdd448) - **teradata**: parse DELETE ALL [CODEX] *(PR [#9228](https://github.com/tobymao/sqlglot/pull/9228) by [@Walkeer](https://github.com/Walkeer))*
|
|
82
|
+
- [`534375c`](https://github.com/tobymao/sqlglot/commit/534375c62cffff607953f7ca69f4a5d6ad74e7be) - **optimizer**: preserve inferred result types when simplifying conditionals [CODEX] *(PR [#9231](https://github.com/tobymao/sqlglot/pull/9231) by [@georgesittas](https://github.com/georgesittas))*
|
|
83
|
+
- :arrow_lower_right: *fixes issue [#9216](https://github.com/tobymao/sqlglot/issues/9216) opened by [@shivangithaker-0510](https://github.com/shivangithaker-0510)*
|
|
84
|
+
- [`374f0e6`](https://github.com/tobymao/sqlglot/commit/374f0e67dcda5681ce4e9fc14ce20f1e679cbf98) - **teradata**: parse period bound functions [CODEX] *(PR [#9233](https://github.com/tobymao/sqlglot/pull/9233) by [@Walkeer](https://github.com/Walkeer))*
|
|
85
|
+
- [`1055c0a`](https://github.com/tobymao/sqlglot/commit/1055c0a657cb5d260f32d43678cfeddc569a91ee) - **sqlite**: preserve fractional RAND semantics *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
86
|
+
- :arrow_lower_right: *fixes issue [#9234](https://github.com/tobymao/sqlglot/issues/9234) opened by [@LeelaMeenakshi](https://github.com/LeelaMeenakshi)*
|
|
87
|
+
- [`d53acff`](https://github.com/tobymao/sqlglot/commit/d53acffcf3ab0cb8ae8da9151b740e0a59d52baf) - **teradata**: retain implicit INSERT value sources *(PR [#9239](https://github.com/tobymao/sqlglot/pull/9239) by [@Walkeer](https://github.com/Walkeer))*
|
|
88
|
+
- [`2d2f1b9`](https://github.com/tobymao/sqlglot/commit/2d2f1b9216c68b3c8f058f9b0648f03defea5c6e) - **sqlite**: preserve result types in interval arithmetic *(PR [#9240](https://github.com/tobymao/sqlglot/pull/9240) by [@georgesittas](https://github.com/georgesittas))*
|
|
89
|
+
- :arrow_lower_right: *fixes issue [#9235](https://github.com/tobymao/sqlglot/issues/9235) opened by [@EnesSoydan](https://github.com/EnesSoydan)*
|
|
90
|
+
- [`b7df239`](https://github.com/tobymao/sqlglot/commit/b7df239748c3ac753117d31368d8f23a8477dc2f) - **optimizer**: raise OptimizeError for a positional reference to a star *(PR [#9241](https://github.com/tobymao/sqlglot/pull/9241) by [@barakalon](https://github.com/barakalon))*
|
|
91
|
+
- [`670dd01`](https://github.com/tobymao/sqlglot/commit/670dd01c53e7d4a9beb426e76a4a982010f07af7) - **postgres**: parse the @ absolute value operator [CLAUDE] *(PR [#9245](https://github.com/tobymao/sqlglot/pull/9245) by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar))*
|
|
92
|
+
- :arrow_lower_right: *fixes issue [#9244](https://github.com/tobymao/sqlglot/issues/9244) opened by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar)*
|
|
93
|
+
- [`9951ad2`](https://github.com/tobymao/sqlglot/commit/9951ad252d0ef17bab744b94fcb8f90ba6bbf858) - **snowflake**: tokenize unquoted stage paths and file:// URIs as a single token *(PR [#9243](https://github.com/tobymao/sqlglot/pull/9243) by [@kyle-cheung](https://github.com/kyle-cheung))*
|
|
94
|
+
- :arrow_lower_right: *fixes issue [#9242](https://github.com/tobymao/sqlglot/issues/9242) opened by [@kyle-cheung](https://github.com/kyle-cheung)*
|
|
95
|
+
- [`54f33fb`](https://github.com/tobymao/sqlglot/commit/54f33fbfe9461729181dde1404b7e73bc026cedb) - **postgres**: respect prefix root operator precedence *(PR [#9252](https://github.com/tobymao/sqlglot/pull/9252) by [@georgesittas](https://github.com/georgesittas))*
|
|
96
|
+
- :arrow_lower_right: *fixes issue [#9248](https://github.com/tobymao/sqlglot/issues/9248) opened by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar)*
|
|
97
|
+
- [`b34d8ed`](https://github.com/tobymao/sqlglot/commit/b34d8ed7a317476b24527cfca2733f2e5aeb270c) - **parser**: correct READ UNCOMMITTED isolation level spelling *(PR [#9251](https://github.com/tobymao/sqlglot/pull/9251) by [@AnvitAggarwal](https://github.com/AnvitAggarwal))*
|
|
98
|
+
- [`2deb754`](https://github.com/tobymao/sqlglot/commit/2deb754793ee39a69c2535b198b5b07d2cf04f31) - **postgres**: generate valid JSON object aggregates *(PR [#9254](https://github.com/tobymao/sqlglot/pull/9254) by [@georgesittas](https://github.com/georgesittas))*
|
|
99
|
+
- :arrow_lower_right: *fixes issue [#9246](https://github.com/tobymao/sqlglot/issues/9246) opened by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar)*
|
|
100
|
+
- [`8196308`](https://github.com/tobymao/sqlglot/commit/8196308d406ac2ad2dec0b212f7395c6130679e1) - **postgres**: parse LISTEN, NOTIFY, UNLISTEN, DEALLOCATE and DISCARD as commands [CLAUDE] *(PR [#9261](https://github.com/tobymao/sqlglot/pull/9261) by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar))*
|
|
101
|
+
- :arrow_lower_right: *fixes issue [#9260](https://github.com/tobymao/sqlglot/issues/9260) opened by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar)*
|
|
102
|
+
- [`c6707fb`](https://github.com/tobymao/sqlglot/commit/c6707fb4564140f587e7361c3e7dadebd54b189a) - **snowflake**: simplify unquoted stage path tokenization *(PR [#9257](https://github.com/tobymao/sqlglot/pull/9257) by [@georgesittas](https://github.com/georgesittas))*
|
|
103
|
+
- [`b812ff9`](https://github.com/tobymao/sqlglot/commit/b812ff95afa2ab7ab925f95edd5d97c4b761cec9) - Add tests and fix Databricks split part annotate type *(PR [#9265](https://github.com/tobymao/sqlglot/pull/9265) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
104
|
+
- [`0fc1041`](https://github.com/tobymao/sqlglot/commit/0fc1041b68f30a6aab14b3301cb6fe0467fea662) - **sqlite**: wrap parenthesized set operation operands *(PR [#9285](https://github.com/tobymao/sqlglot/pull/9285) by [@georgesittas](https://github.com/georgesittas))*
|
|
105
|
+
- :arrow_lower_right: *fixes issue [#9269](https://github.com/tobymao/sqlglot/issues/9269) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
106
|
+
- [`d4bc034`](https://github.com/tobymao/sqlglot/commit/d4bc0349170b37a55fcbe640692144314e288645) - **sqlite**: omit empty GROUP BY from global aggregates *(PR [#9286](https://github.com/tobymao/sqlglot/pull/9286) by [@georgesittas](https://github.com/georgesittas))*
|
|
107
|
+
- :arrow_lower_right: *fixes issue [#9270](https://github.com/tobymao/sqlglot/issues/9270) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
108
|
+
- [`271fc0b`](https://github.com/tobymao/sqlglot/commit/271fc0b60a24b638b7312f35a6a49a33d5121557) - **optimizer**: compare date literals at midnight with timestamps [CODEX] *(PR [#9263](https://github.com/tobymao/sqlglot/pull/9263) by [@georgesittas](https://github.com/georgesittas))*
|
|
109
|
+
- :arrow_lower_right: *fixes issue [#9247](https://github.com/tobymao/sqlglot/issues/9247) opened by [@Pratik-Kumar-Dhakar](https://github.com/Pratik-Kumar-Dhakar)*
|
|
110
|
+
- [`679c8c9`](https://github.com/tobymao/sqlglot/commit/679c8c9949fc71f718739e2d8cc33a2426270f63) - **sqlite**: count calendar day boundaries in DATEDIFF *(PR [#9287](https://github.com/tobymao/sqlglot/pull/9287) by [@georgesittas](https://github.com/georgesittas))*
|
|
111
|
+
- :arrow_lower_right: *fixes issue [#9271](https://github.com/tobymao/sqlglot/issues/9271) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
112
|
+
- [`d2de3ce`](https://github.com/tobymao/sqlglot/commit/d2de3cec78a040ddc994ad7a60f3aff6dae76693) - **postgres**: Preserve optional precision for current time and timestamp *(PR [#9290](https://github.com/tobymao/sqlglot/pull/9290) by [@georgesittas](https://github.com/georgesittas))*
|
|
113
|
+
- :arrow_lower_right: *fixes issue [#9276](https://github.com/tobymao/sqlglot/issues/9276) opened by [@JabberWocky-22](https://github.com/JabberWocky-22)*
|
|
114
|
+
- [`ca0d953`](https://github.com/tobymao/sqlglot/commit/ca0d9539429c0e5e94aad1dbaa2a8138604951c7) - **postgres**: preserve DATE_PART semantics and EXTRACT result types *(PR [#9288](https://github.com/tobymao/sqlglot/pull/9288) by [@georgesittas](https://github.com/georgesittas))*
|
|
115
|
+
- :arrow_lower_right: *fixes issue [#9272](https://github.com/tobymao/sqlglot/issues/9272) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
116
|
+
- [`1e2ef67`](https://github.com/tobymao/sqlglot/commit/1e2ef67a93528584c3643bb87ec545311e6a3e20) - **postgres**: decode Unicode-escaped identifiers [CODEX] *(PR [#9289](https://github.com/tobymao/sqlglot/pull/9289) by [@georgesittas](https://github.com/georgesittas))*
|
|
117
|
+
- :arrow_lower_right: *fixes issue [#9273](https://github.com/tobymao/sqlglot/issues/9273) opened by [@tdsmith](https://github.com/tdsmith)*
|
|
118
|
+
- [`f95fca8`](https://github.com/tobymao/sqlglot/commit/f95fca8a6a9b34faabc05f31109f6fb10d051f40) - **clickhouse**: resolve dotted references to projection aliases [CODEX] *(PR [#9293](https://github.com/tobymao/sqlglot/pull/9293) by [@georgesittas](https://github.com/georgesittas))*
|
|
119
|
+
- :arrow_lower_right: *fixes issue [#9279](https://github.com/tobymao/sqlglot/issues/9279) opened by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog)*
|
|
120
|
+
- [`41fce8b`](https://github.com/tobymao/sqlglot/commit/41fce8b04bf905919abc23dcf4eb8a45643b2cb9) - **sqlite**: parse END transaction aliases as COMMIT *(PR [#9297](https://github.com/tobymao/sqlglot/pull/9297) by [@georgesittas](https://github.com/georgesittas))*
|
|
121
|
+
- :arrow_lower_right: *fixes issue [#9280](https://github.com/tobymao/sqlglot/issues/9280) opened by [@InnoxCodes](https://github.com/InnoxCodes)*
|
|
122
|
+
- [`68ef75b`](https://github.com/tobymao/sqlglot/commit/68ef75b2b6e6d1223115f16c9ff257fea662ab5c) - **sqlite**: support conflict resolution in UPDATE statements *(PR [#9296](https://github.com/tobymao/sqlglot/pull/9296) by [@georgesittas](https://github.com/georgesittas))*
|
|
123
|
+
- :arrow_lower_right: *fixes issue [#9281](https://github.com/tobymao/sqlglot/issues/9281) opened by [@InnoxCodes](https://github.com/InnoxCodes)*
|
|
124
|
+
- [`dc4afaf`](https://github.com/tobymao/sqlglot/commit/dc4afaf5c9a6748a004998ed13e3b438e20e431e) - **parser**: distinguish TOP identifiers from row limits *(PR [#9295](https://github.com/tobymao/sqlglot/pull/9295) by [@georgesittas](https://github.com/georgesittas))*
|
|
125
|
+
- :arrow_lower_right: *fixes issue [#9284](https://github.com/tobymao/sqlglot/issues/9284) opened by [@Master-Norna](https://github.com/Master-Norna)*
|
|
126
|
+
- [`089891f`](https://github.com/tobymao/sqlglot/commit/089891f2521780e2c5b243005017af9db62f25a6) - **optimizer**: alias unnamed subquery projections with exp.Alias *(PR [#9299](https://github.com/tobymao/sqlglot/pull/9299) by [@barakalon](https://github.com/barakalon))*
|
|
127
|
+
- [`ffcb648`](https://github.com/tobymao/sqlglot/commit/ffcb648293db4fce5cfabf42faded3ef0da72768) - **parser**: reject commas after TOP clauses *(PR [#9315](https://github.com/tobymao/sqlglot/pull/9315) by [@georgesittas](https://github.com/georgesittas))*
|
|
128
|
+
- :arrow_lower_right: *fixes issue [#9300](https://github.com/tobymao/sqlglot/issues/9300) opened by [@Master-Norna](https://github.com/Master-Norna)*
|
|
129
|
+
- [`7adae87`](https://github.com/tobymao/sqlglot/commit/7adae875c036dae90fa8a043f23c64f76406d3c3) - **sqlite**: preserve timezone-aware timestamp casts in date arithmetic *(PR [#9318](https://github.com/tobymao/sqlglot/pull/9318) by [@georgesittas](https://github.com/georgesittas))*
|
|
130
|
+
- :arrow_lower_right: *fixes issue [#9304](https://github.com/tobymao/sqlglot/issues/9304) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
131
|
+
- [`2f42ed3`](https://github.com/tobymao/sqlglot/commit/2f42ed3fe2acda934293465b58dfe6315381ca3d) - **duckdb**: preserve parentheses in ordered-set percentile arguments *(PR [#9319](https://github.com/tobymao/sqlglot/pull/9319) by [@georgesittas](https://github.com/georgesittas))*
|
|
132
|
+
- :arrow_lower_right: *fixes issue [#9305](https://github.com/tobymao/sqlglot/issues/9305) opened by [@jackie-h](https://github.com/jackie-h)*
|
|
133
|
+
- [`9d192fa`](https://github.com/tobymao/sqlglot/commit/9d192fa79446d968d5f0fdd5cae19a31217687aa) - **spark**: map ISODOW to DOW_ISO in EXTRACT *(PR [#9321](https://github.com/tobymao/sqlglot/pull/9321) by [@georgesittas](https://github.com/georgesittas))*
|
|
134
|
+
- :arrow_lower_right: *fixes issue [#9307](https://github.com/tobymao/sqlglot/issues/9307) opened by [@jackie-h](https://github.com/jackie-h)*
|
|
135
|
+
- [`5c0943b`](https://github.com/tobymao/sqlglot/commit/5c0943b65871f471cf78163a2614c8ad7174f582) - **sqlite**: clamp calendar intervals at month end [CODEX] *(PR [#9316](https://github.com/tobymao/sqlglot/pull/9316) by [@georgesittas](https://github.com/georgesittas))*
|
|
136
|
+
- :arrow_lower_right: *fixes issue [#9302](https://github.com/tobymao/sqlglot/issues/9302) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
137
|
+
- [`c6ef895`](https://github.com/tobymao/sqlglot/commit/c6ef895430c3ee7d5d29c9c3cabd07e04064d372) - **spark**: preserve exact ordered percentiles *(PR [#9320](https://github.com/tobymao/sqlglot/pull/9320) by [@georgesittas](https://github.com/georgesittas))*
|
|
138
|
+
- :arrow_lower_right: *fixes issue [#9306](https://github.com/tobymao/sqlglot/issues/9306) opened by [@jackie-h](https://github.com/jackie-h)*
|
|
139
|
+
- [`b503505`](https://github.com/tobymao/sqlglot/commit/b503505dc36e9ba9c3baad7425428d94eabc0c97) - **sqlite**: flag ambiguous calendar interval arithmetic *(PR [#9317](https://github.com/tobymao/sqlglot/pull/9317) by [@georgesittas](https://github.com/georgesittas))*
|
|
140
|
+
- :arrow_lower_right: *fixes issue [#9303](https://github.com/tobymao/sqlglot/issues/9303) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
141
|
+
- [`7698324`](https://github.com/tobymao/sqlglot/commit/7698324083ea8087d9e27976aa43dd23da7e5066) - **snowflake**: preserve UNNEST offset column references *(PR [#9324](https://github.com/tobymao/sqlglot/pull/9324) by [@georgesittas](https://github.com/georgesittas))*
|
|
142
|
+
- :arrow_lower_right: *fixes issue [#9311](https://github.com/tobymao/sqlglot/issues/9311) opened by [@anishmehta24](https://github.com/anishmehta24)*
|
|
143
|
+
- [`8806f8e`](https://github.com/tobymao/sqlglot/commit/8806f8e4e4cb71b61841119175a35b2a986a3561) - **snowflake**: parse casts on positional bind parameters *(PR [#9326](https://github.com/tobymao/sqlglot/pull/9326) by [@georgesittas](https://github.com/georgesittas))*
|
|
144
|
+
- :arrow_lower_right: *fixes issue [#9313](https://github.com/tobymao/sqlglot/issues/9313) opened by [@tekumara](https://github.com/tekumara)*
|
|
145
|
+
- [`ae01f91`](https://github.com/tobymao/sqlglot/commit/ae01f91cd6364921462b037b01f59f71207dc977) - **dialects**: preserve NULL elements in ARRAY_REMOVE filters [CODEX] *(PR [#9322](https://github.com/tobymao/sqlglot/pull/9322) by [@georgesittas](https://github.com/georgesittas))*
|
|
146
|
+
- :arrow_lower_right: *fixes issue [#9301](https://github.com/tobymao/sqlglot/issues/9301) opened by [@EduardoAndradeSLima](https://github.com/EduardoAndradeSLima)*
|
|
147
|
+
- [`d3a2eaf`](https://github.com/tobymao/sqlglot/commit/d3a2eafd171021d269e06b5f7a370451d6e9f04c) - **expressions**: preserve grouping in Python binary operators *(PR [#9330](https://github.com/tobymao/sqlglot/pull/9330) by [@georgesittas](https://github.com/georgesittas))*
|
|
148
|
+
- :arrow_lower_right: *fixes issue [#9329](https://github.com/tobymao/sqlglot/issues/9329) opened by [@Ezibenroc](https://github.com/Ezibenroc)*
|
|
149
|
+
- [`6edd409`](https://github.com/tobymao/sqlglot/commit/6edd409d5b2e6f676a3702120a26a60dbc516931) - **expressions**: preserve NOT grouping in binary operators *(PR [#9333](https://github.com/tobymao/sqlglot/pull/9333) by [@georgesittas](https://github.com/georgesittas))*
|
|
150
|
+
- [`4caae63`](https://github.com/tobymao/sqlglot/commit/4caae634b78b538ee91173a29c670b6576599315) - **parser**: recognize ORDER BY ALL in ClickHouse and Snowflake *(PR [#9332](https://github.com/tobymao/sqlglot/pull/9332) by [@georgesittas](https://github.com/georgesittas))*
|
|
151
|
+
- :arrow_lower_right: *fixes issue [#9331](https://github.com/tobymao/sqlglot/issues/9331) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
152
|
+
|
|
153
|
+
### :zap: Performance Improvements
|
|
154
|
+
- [`0e9b6fc`](https://github.com/tobymao/sqlglot/commit/0e9b6fc9d7ada9ba40cec8626109440bce0b3b40) - **hive**: avoid reparsing type names during cast normalization [CODEX] *(PR [#9238](https://github.com/tobymao/sqlglot/pull/9238) by [@mlichtblau](https://github.com/mlichtblau))*
|
|
155
|
+
|
|
156
|
+
### :recycle: Refactors
|
|
157
|
+
- [`f59bcbc`](https://github.com/tobymao/sqlglot/commit/f59bcbcaa0ed549d61ed6d15f16f015cb2e9edc7) - simplify SQLite integer literal division *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
158
|
+
|
|
159
|
+
### :white_check_mark: Tests
|
|
160
|
+
- [`4b49cff`](https://github.com/tobymao/sqlglot/commit/4b49cff32f9d06f1f56ecde421ac3bd5ee450dcf) - deduplicate regression coverage *(PR [#9184](https://github.com/tobymao/sqlglot/pull/9184) by [@georgesittas](https://github.com/georgesittas))*
|
|
161
|
+
- [`a36965e`](https://github.com/tobymao/sqlglot/commit/a36965e196f010cded4eca7b7681852402ff2339) - **exasol**: simplify HASHTYPE cast coverage *(PR [#9220](https://github.com/tobymao/sqlglot/pull/9220) by [@georgesittas](https://github.com/georgesittas))*
|
|
162
|
+
|
|
163
|
+
### :wrench: Chores
|
|
164
|
+
- [`d76a4d5`](https://github.com/tobymao/sqlglot/commit/d76a4d5bf61d26ff7cf8f7abbb6271356cc74128) - refresh the integration tests pointer after [#9290](https://github.com/tobymao/sqlglot/pull/9290) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
165
|
+
- [`1121851`](https://github.com/tobymao/sqlglot/commit/11218512e4eebf5c922e60aabff48351dd0a8dfb) - sync integration tests after [#9294](https://github.com/tobymao/sqlglot/pull/9294) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
166
|
+
- [`e7f62ba`](https://github.com/tobymao/sqlglot/commit/e7f62bab9d7c1a7b646dff70bc72c1270329518d) - sync integration tests submodule with main *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
167
|
+
|
|
168
|
+
|
|
4
169
|
## [v30.33.0] - 2026-11-17
|
|
5
170
|
### :boom: BREAKING CHANGES
|
|
6
171
|
- due to [`fe09eb5`](https://github.com/tobymao/sqlglot/commit/fe09eb5c2c7269acb908af083539d0aaeca25b93) - treat SHA1/SHA256/SHA512 as binary digests [CLAUDE] *(PR [#9156](https://github.com/tobymao/sqlglot/pull/9156) by [@DeepBuha06](https://github.com/DeepBuha06))*:
|
|
@@ -16898,3 +17063,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
16898
17063
|
[v30.31.0]: https://github.com/tobymao/sqlglot/compare/v30.30.0...v30.31.0
|
|
16899
17064
|
[v30.32.0]: https://github.com/tobymao/sqlglot/compare/v30.31.0...v30.32.0
|
|
16900
17065
|
[v30.33.0]: https://github.com/tobymao/sqlglot/compare/v30.32.0...v30.33.0
|
|
17066
|
+
[v30.34.0]: https://github.com/tobymao/sqlglot/compare/v30.33.0...v30.34.0
|
|
17067
|
+
[v30.35.0]: https://github.com/tobymao/sqlglot/compare/v30.34.0...v30.35.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.36.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.36.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.36.0; python_version >= "3.10" and extra == "rs"
|
|
41
41
|
Dynamic: license-file
|
|
42
42
|
Dynamic: provides-extra
|
|
43
43
|
|
|
@@ -163,6 +163,10 @@ sqlglot.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")
|
|
|
163
163
|
'SELECT FROM_UNIXTIME(1618088028295 / POW(10, 3))'
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
For version-dependent SQL, include the target engine version in `write`. For example,
|
|
167
|
+
`write="spark, version=3.5"` or `write="databricks, version=15.4"` translates PostgreSQL's
|
|
168
|
+
`STRING_AGG` using array functions on engines that predate `LISTAGG`.
|
|
169
|
+
|
|
166
170
|
SQLGlot can even translate custom time formats:
|
|
167
171
|
|
|
168
172
|
```python
|
|
@@ -680,6 +684,7 @@ Without dateutil, the optimizer leaves this arithmetic unevaluated.
|
|
|
680
684
|
| TSQL | Official |
|
|
681
685
|
| YDB | [Plugin](https://pypi.org/project/ydb-sqlglot-plugin) |
|
|
682
686
|
| MaxCompute | [Plugin](https://pypi.org/project/sqlglot-maxcompute) |
|
|
687
|
+
| Pinot | [Plugin](https://pypi.org/project/sqlglot-pinot) |
|
|
683
688
|
|
|
684
689
|
**Official Dialects** are maintained by the core SQLGlot team with higher priority for bug fixes and feature additions.
|
|
685
690
|
|
|
@@ -120,6 +120,10 @@ sqlglot.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")
|
|
|
120
120
|
'SELECT FROM_UNIXTIME(1618088028295 / POW(10, 3))'
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
For version-dependent SQL, include the target engine version in `write`. For example,
|
|
124
|
+
`write="spark, version=3.5"` or `write="databricks, version=15.4"` translates PostgreSQL's
|
|
125
|
+
`STRING_AGG` using array functions on engines that predate `LISTAGG`.
|
|
126
|
+
|
|
123
127
|
SQLGlot can even translate custom time formats:
|
|
124
128
|
|
|
125
129
|
```python
|
|
@@ -637,6 +641,7 @@ Without dateutil, the optimizer leaves this arithmetic unevaluated.
|
|
|
637
641
|
| TSQL | Official |
|
|
638
642
|
| YDB | [Plugin](https://pypi.org/project/ydb-sqlglot-plugin) |
|
|
639
643
|
| MaxCompute | [Plugin](https://pypi.org/project/sqlglot-maxcompute) |
|
|
644
|
+
| Pinot | [Plugin](https://pypi.org/project/sqlglot-pinot) |
|
|
640
645
|
|
|
641
646
|
**Official Dialects** are maintained by the core SQLGlot team with higher priority for bug fixes and feature additions.
|
|
642
647
|
|
|
@@ -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.36.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 36, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ge356698c9'
|
|
@@ -49,6 +49,8 @@ class Athena(Trino):
|
|
|
49
49
|
- https://docs.aws.amazon.com/athena/latest/ug/dml-queries-functions-operators.html
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
+
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = False
|
|
53
|
+
|
|
52
54
|
# This Tokenizer consumes a combination of HiveQL and Trino SQL and then processes the tokens
|
|
53
55
|
# to disambiguate which dialect needs to be actually used in order to tokenize correctly.
|
|
54
56
|
class Tokenizer(tokens.Tokenizer):
|
|
@@ -72,7 +74,7 @@ class Athena(Trino):
|
|
|
72
74
|
super().__init__(dialect=dialect)
|
|
73
75
|
|
|
74
76
|
self._hive_tokenizer = Hive().tokenizer()
|
|
75
|
-
self._trino_tokenizer = _TrinoTokenizer(
|
|
77
|
+
self._trino_tokenizer = _TrinoTokenizer(Athena())
|
|
76
78
|
|
|
77
79
|
def tokenize(self, sql: str) -> list[Token]:
|
|
78
80
|
# DML only needs Trino's tokenizer; possible Hive statements need disambiguation.
|
|
@@ -152,6 +154,7 @@ def _tokenize_as_hive(tokens: list[Token]) -> bool:
|
|
|
152
154
|
|
|
153
155
|
# Athena extensions to Trino's tokenizer
|
|
154
156
|
class _TrinoTokenizer(Trino.Tokenizer):
|
|
157
|
+
COMMANDS = Trino.Tokenizer.COMMANDS | {TokenType.EXECUTE}
|
|
155
158
|
KEYWORDS = {
|
|
156
159
|
**Trino.Tokenizer.KEYWORDS,
|
|
157
160
|
"UNLOAD": TokenType.COMMAND,
|
|
@@ -20,6 +20,7 @@ class ClickHouse(Dialect):
|
|
|
20
20
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
21
21
|
LOG_BASE_FIRST: bool | None = None
|
|
22
22
|
FORCE_EARLY_ALIAS_REF_EXPANSION = True
|
|
23
|
+
SUPPORTS_FORWARD_ALIAS_REFS = True
|
|
23
24
|
PREFER_PROJECTION_ALIASES_IN_DOT_PATHS = True
|
|
24
25
|
ORIGINAL_NAME_META_KEY = "clickhouse_name"
|
|
25
26
|
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
|
|
@@ -98,6 +99,7 @@ class ClickHouse(Dialect):
|
|
|
98
99
|
|
|
99
100
|
KEYWORDS = {
|
|
100
101
|
**tokens.Tokenizer.KEYWORDS,
|
|
102
|
+
"<=>": TokenType.NULLSAFE_EQ,
|
|
101
103
|
".:": TokenType.DOTCOLON,
|
|
102
104
|
".^": TokenType.DOTCARET,
|
|
103
105
|
"ATTACH": TokenType.COMMAND,
|
|
@@ -7,6 +7,7 @@ import string
|
|
|
7
7
|
import typing as t
|
|
8
8
|
import sys
|
|
9
9
|
from collections.abc import Iterable, MutableSequence
|
|
10
|
+
from decimal import Decimal
|
|
10
11
|
from enum import Enum, auto
|
|
11
12
|
from functools import reduce
|
|
12
13
|
from builtins import type as Type
|
|
@@ -611,6 +612,9 @@ class Dialect(metaclass=_Dialect):
|
|
|
611
612
|
to "WHERE id = 1 GROUP BY id HAVING id = 1"
|
|
612
613
|
"""
|
|
613
614
|
|
|
615
|
+
SUPPORTS_FORWARD_ALIAS_REFS = False
|
|
616
|
+
"""Whether SELECT list expressions can reference aliases defined later in the same list."""
|
|
617
|
+
|
|
614
618
|
PREFER_PROJECTION_ALIASES_IN_DOT_PATHS = False
|
|
615
619
|
"""Whether `obj.field` prefers a projection alias named `obj` over a source column of the same name."""
|
|
616
620
|
|
|
@@ -956,6 +960,9 @@ class Dialect(metaclass=_Dialect):
|
|
|
956
960
|
Whether to prioritize non-literal types over literals during type annotation.
|
|
957
961
|
"""
|
|
958
962
|
|
|
963
|
+
# (inclusive max, type) pairs for integer literals, tried in order; a None max is unbounded
|
|
964
|
+
INT_LITERAL_TYPES: tuple[tuple[int | None, exp.DType], ...] = ((None, exp.DType.INT),)
|
|
965
|
+
|
|
959
966
|
ALIAS_POST_VERSION = True
|
|
960
967
|
"""Whether the table alias comes after version (timestamp or iceberg snapshot)."""
|
|
961
968
|
|
|
@@ -1092,6 +1099,9 @@ class Dialect(metaclass=_Dialect):
|
|
|
1092
1099
|
"CENTURIES": "CENTURY",
|
|
1093
1100
|
}
|
|
1094
1101
|
|
|
1102
|
+
# Aliases used only when generating EXTRACT.
|
|
1103
|
+
EXTRACT_DATE_PART_MAPPING: t.ClassVar[dict[str, str]] = {}
|
|
1104
|
+
|
|
1095
1105
|
# Specifies what types a given type can be coerced into
|
|
1096
1106
|
COERCES_TO: dict[exp.DType, set[exp.DType]] = {}
|
|
1097
1107
|
|
|
@@ -1401,6 +1411,19 @@ class Dialect(metaclass=_Dialect):
|
|
|
1401
1411
|
for i, _ in enumerate(expression.expressions[0].expressions)
|
|
1402
1412
|
]
|
|
1403
1413
|
|
|
1414
|
+
def int_literal_type(self, expression: exp.Literal) -> exp.DataType | exp.DType:
|
|
1415
|
+
return self.integer_type_for_value(int(expression.to_py()))
|
|
1416
|
+
|
|
1417
|
+
def integer_type_for_value(self, value: int | Decimal) -> exp.DType:
|
|
1418
|
+
"""Return the type of an integer literal with the given value."""
|
|
1419
|
+
for bound, int_type in self.INT_LITERAL_TYPES:
|
|
1420
|
+
if bound is None or value <= bound:
|
|
1421
|
+
return int_type
|
|
1422
|
+
return exp.DType.INT
|
|
1423
|
+
|
|
1424
|
+
def decimal_literal_type(self, text: str) -> exp.DataType | exp.DType:
|
|
1425
|
+
return exp.DType.DOUBLE
|
|
1426
|
+
|
|
1404
1427
|
|
|
1405
1428
|
DialectType = t.Union[str, Dialect, Type[Dialect], None]
|
|
1406
1429
|
|
|
@@ -1897,6 +1920,21 @@ def months_between_sql(self: Generator, expression: exp.MonthsBetween) -> str:
|
|
|
1897
1920
|
return self.sql(result)
|
|
1898
1921
|
|
|
1899
1922
|
|
|
1923
|
+
def build_array_lambda_func(
|
|
1924
|
+
exp_class: Type[E], name: str, *, supports_mask: bool = False
|
|
1925
|
+
) -> t.Callable[[list[exp.Expr]], E | exp.Anonymous]:
|
|
1926
|
+
def _builder(args: list[exp.Expr]) -> E | exp.Anonymous:
|
|
1927
|
+
predicate = seq_get(args, 0)
|
|
1928
|
+
is_mask = supports_mask and not isinstance(predicate, exp.Lambda)
|
|
1929
|
+
if is_mask or len(args) > 2:
|
|
1930
|
+
# The shared expression represents a lambda over a single array.
|
|
1931
|
+
return exp.Anonymous(this=name, expressions=args)
|
|
1932
|
+
|
|
1933
|
+
return exp_class(this=seq_get(args, 1), expression=predicate)
|
|
1934
|
+
|
|
1935
|
+
return _builder
|
|
1936
|
+
|
|
1937
|
+
|
|
1900
1938
|
def build_formatted_time(
|
|
1901
1939
|
exp_class: Type[E], dialect_override: str | None = None, default: bool | str | None = None
|
|
1902
1940
|
) -> t.Callable[[BuilderArgs, Dialect], E]:
|
|
@@ -2088,6 +2126,10 @@ def timestrtotime_sql(
|
|
|
2088
2126
|
return self.sql(exp.cast(expression.this, datatype, dialect=self.dialect))
|
|
2089
2127
|
|
|
2090
2128
|
|
|
2129
|
+
def build_dayofweek_zero_based(args: BuilderArgs) -> exp.DayOfWeek:
|
|
2130
|
+
return exp.DayOfWeek(this=seq_get(args, 0), zero_based=True)
|
|
2131
|
+
|
|
2132
|
+
|
|
2091
2133
|
def datestrtodate_sql(self: Generator, expression: exp.DateStrToDate) -> str:
|
|
2092
2134
|
return self.sql(exp.cast(expression.this, exp.DType.DATE))
|
|
2093
2135
|
|
|
@@ -2403,10 +2445,10 @@ def ts_or_ds_add_cast(expression: exp.TsOrDsAdd) -> exp.TsOrDsAdd:
|
|
|
2403
2445
|
|
|
2404
2446
|
|
|
2405
2447
|
def remove_ts_or_ds_to_date(
|
|
2406
|
-
to_sql: t.Callable[[Generator,
|
|
2448
|
+
to_sql: t.Callable[[Generator, F], str] | None = None,
|
|
2407
2449
|
args: tuple[str, ...] = ("this",),
|
|
2408
|
-
) -> t.Callable[[Generator,
|
|
2409
|
-
def func(self: Generator, expression:
|
|
2450
|
+
) -> t.Callable[[Generator, F], str]:
|
|
2451
|
+
def func(self: Generator, expression: F) -> str:
|
|
2410
2452
|
for arg_key in args:
|
|
2411
2453
|
arg = expression.args.get(arg_key)
|
|
2412
2454
|
if isinstance(arg, (exp.TsOrDsToDate, exp.TsOrDsToTimestamp)) and not arg.args.get(
|
|
@@ -2579,23 +2621,27 @@ def week_unit_to_dow(unit: exp.Expr | None) -> int | None:
|
|
|
2579
2621
|
|
|
2580
2622
|
|
|
2581
2623
|
@t.overload
|
|
2582
|
-
def map_date_part(
|
|
2624
|
+
def map_date_part(
|
|
2625
|
+
part: exp.Expr, dialect: DialectType = Dialect, *, mapping: dict[str, str] | None = None
|
|
2626
|
+
) -> exp.Expr:
|
|
2583
2627
|
pass
|
|
2584
2628
|
|
|
2585
2629
|
|
|
2586
2630
|
@t.overload
|
|
2587
|
-
def map_date_part(
|
|
2631
|
+
def map_date_part(
|
|
2632
|
+
part: exp.Expr | None, dialect: DialectType = Dialect, *, mapping: dict[str, str] | None = None
|
|
2633
|
+
) -> exp.Expr | None:
|
|
2588
2634
|
pass
|
|
2589
2635
|
|
|
2590
2636
|
|
|
2591
|
-
def map_date_part(part, dialect: DialectType = Dialect):
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
if
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2637
|
+
def map_date_part(part, dialect: DialectType = Dialect, *, mapping: dict[str, str] | None = None):
|
|
2638
|
+
"""Map a date part using explicit aliases or the dialect's general aliases."""
|
|
2639
|
+
if part and not (isinstance(part, exp.Column) and len(part.parts) != 1):
|
|
2640
|
+
if mapping is None:
|
|
2641
|
+
mapping = Dialect.get_or_raise(dialect).DATE_PART_MAPPING
|
|
2642
|
+
mapped = mapping.get(part.name.upper())
|
|
2643
|
+
if mapped:
|
|
2644
|
+
return exp.Literal.string(mapped) if part.is_string else exp.var(mapped)
|
|
2599
2645
|
|
|
2600
2646
|
return part
|
|
2601
2647
|
|
|
@@ -5,6 +5,7 @@ from sqlglot.dialects.dialect import AliasPrecedence
|
|
|
5
5
|
from sqlglot.dialects.mysql import MySQL
|
|
6
6
|
from sqlglot.generators.doris import DorisGenerator
|
|
7
7
|
from sqlglot.parsers.doris import DorisParser
|
|
8
|
+
from sqlglot.tokens import TokenType
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class Doris(MySQL):
|
|
@@ -21,6 +22,13 @@ class Doris(MySQL):
|
|
|
21
22
|
DASH_COMMENT_REQUIRES_BOUNDARY = False
|
|
22
23
|
COMMENTS_TERMINATE_AT_NEWLINE_ONLY = False
|
|
23
24
|
|
|
25
|
+
KEYWORDS = {
|
|
26
|
+
**MySQL.Tokenizer.KEYWORDS,
|
|
27
|
+
"IPV4": TokenType.IPV4,
|
|
28
|
+
"IPV6": TokenType.IPV6,
|
|
29
|
+
"LARGEINT": TokenType.INT128,
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
Parser = DorisParser
|
|
25
33
|
|
|
26
34
|
Generator = DorisGenerator
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from sqlglot import tokens
|
|
3
|
+
from sqlglot import exp, tokens
|
|
4
4
|
from sqlglot.dialects.dialect import Dialect
|
|
5
5
|
from sqlglot.generators.dremio import DremioGenerator
|
|
6
6
|
from sqlglot.parsers.dremio import DremioParser
|
|
7
|
+
from sqlglot.typing.dremio import EXPRESSION_METADATA
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class Dremio(Dialect):
|
|
11
|
+
INT_LITERAL_TYPES = (
|
|
12
|
+
(-(2**31) - 1, exp.DType.BIGINT),
|
|
13
|
+
(2**31 - 1, exp.DType.INT),
|
|
14
|
+
(None, exp.DType.BIGINT),
|
|
15
|
+
)
|
|
16
|
+
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
10
17
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
11
18
|
CONCAT_COALESCE = True
|
|
12
19
|
CONCAT_WS_COALESCE = True
|
|
@@ -10,6 +10,7 @@ from sqlglot.dialects.dialect import (
|
|
|
10
10
|
UsingColumnOrder,
|
|
11
11
|
)
|
|
12
12
|
from sqlglot.generators.duckdb import DuckDBGenerator, WS_CONTROL_CHARS_TO_DUCK # noqa: F401
|
|
13
|
+
from sqlglot.optimizer.annotate_types import TypeAnnotator
|
|
13
14
|
from sqlglot.parsers.duckdb import DuckDBParser
|
|
14
15
|
from sqlglot.tokens import TokenType
|
|
15
16
|
from sqlglot.typing.duckdb import EXPRESSION_METADATA
|
|
@@ -39,6 +40,27 @@ class DuckDB(Dialect):
|
|
|
39
40
|
USING_COLUMN_ORDER = UsingColumnOrder.IN_PLACE
|
|
40
41
|
REGEXP_EXTRACT_NO_MATCH_RETURNS_NULL = False
|
|
41
42
|
REGEXP_EXTRACT_MISSING_GROUP_RETURNS_EMPTY = True
|
|
43
|
+
INT_LITERAL_TYPES = (
|
|
44
|
+
(-(2**127) - 1, exp.DType.BIGNUM),
|
|
45
|
+
(-(2**63) - 1, exp.DType.INT128),
|
|
46
|
+
(-(2**31), exp.DType.BIGINT), # DuckDB reads 2147483648 as BIGINT before negation.
|
|
47
|
+
(2**31 - 1, exp.DType.INT),
|
|
48
|
+
(2**63 - 1, exp.DType.BIGINT),
|
|
49
|
+
(2**127 - 1, exp.DType.INT128),
|
|
50
|
+
(2**128 - 1, exp.DType.UINT128),
|
|
51
|
+
(None, exp.DType.BIGNUM),
|
|
52
|
+
)
|
|
53
|
+
COERCES_TO = {
|
|
54
|
+
**TypeAnnotator.COERCES_TO,
|
|
55
|
+
exp.DType.INT128: TypeAnnotator.COERCES_TO[exp.DType.BIGINT] | {exp.DType.BIGNUM},
|
|
56
|
+
exp.DType.UINT128: exp.DataType.FLOAT_TYPES | {exp.DType.BIGNUM},
|
|
57
|
+
exp.DType.FLOAT: TypeAnnotator.COERCES_TO[exp.DType.FLOAT] | {exp.DType.BIGNUM},
|
|
58
|
+
exp.DType.BIGNUM: {exp.DType.DOUBLE},
|
|
59
|
+
}
|
|
60
|
+
for _dtype in exp.DataType.SIGNED_INTEGER_TYPES & TypeAnnotator.COERCES_TO.keys():
|
|
61
|
+
COERCES_TO[_dtype] = COERCES_TO[_dtype] | {exp.DType.INT128, exp.DType.BIGNUM}
|
|
62
|
+
for _dtype in exp.DataType.UNSIGNED_INTEGER_TYPES - {exp.DType.UINT128}:
|
|
63
|
+
COERCES_TO[_dtype] = {exp.DType.UINT128, exp.DType.BIGNUM}
|
|
42
64
|
|
|
43
65
|
# https://duckdb.org/docs/sql/introduction.html#creating-a-new-table
|
|
44
66
|
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_INSENSITIVE
|
|
@@ -52,6 +74,7 @@ class DuckDB(Dialect):
|
|
|
52
74
|
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
53
75
|
|
|
54
76
|
DATE_PART_MAPPING.pop("WEEKDAY")
|
|
77
|
+
EXTRACT_DATE_PART_MAPPING = {"ISOWEEK": "WEEK"}
|
|
55
78
|
|
|
56
79
|
INVERSE_TIME_MAPPING = {
|
|
57
80
|
"%e": "%-d", # BigQuery's space-padded day (%e) -> DuckDB's no-padding day (%-d)
|
|
@@ -17,6 +17,17 @@ from sqlglot.typing.hive import EXPRESSION_METADATA
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Hive(Dialect):
|
|
20
|
+
# Hive types the magnitude before applying a unary sign. Keep the INT fallback
|
|
21
|
+
# for values that need a parameterized DECIMAL until decimal coercion is supported.
|
|
22
|
+
INT_LITERAL_TYPES: tuple[tuple[int | None, exp.DType], ...] = (
|
|
23
|
+
(-(10**38), exp.DType.DOUBLE),
|
|
24
|
+
(-(2**63), exp.DType.INT),
|
|
25
|
+
(-(2**31), exp.DType.BIGINT),
|
|
26
|
+
(2**31 - 1, exp.DType.INT),
|
|
27
|
+
(2**63 - 1, exp.DType.BIGINT),
|
|
28
|
+
(10**38 - 1, exp.DType.INT),
|
|
29
|
+
(None, exp.DType.DOUBLE),
|
|
30
|
+
)
|
|
20
31
|
ALIAS_POST_TABLESAMPLE = True
|
|
21
32
|
IDENTIFIERS_CAN_START_WITH_DIGIT = True
|
|
22
33
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
@@ -121,6 +132,7 @@ class Hive(Dialect):
|
|
|
121
132
|
|
|
122
133
|
KEYWORDS = {
|
|
123
134
|
**tokens.Tokenizer.KEYWORDS,
|
|
135
|
+
"<=>": TokenType.NULLSAFE_EQ,
|
|
124
136
|
"ADD ARCHIVE": TokenType.COMMAND,
|
|
125
137
|
"ADD ARCHIVES": TokenType.COMMAND,
|
|
126
138
|
"ADD FILE": TokenType.COMMAND,
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
from sqlglot import exp
|
|
3
6
|
from sqlglot.dialects.postgres import Postgres
|
|
4
7
|
from sqlglot.generators.materialize import MaterializeGenerator
|
|
5
8
|
from sqlglot.parsers.materialize import MaterializeParser
|
|
9
|
+
from sqlglot.typing import annotate_negated_literal
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
class Materialize(Postgres):
|
|
13
|
+
EXPRESSION_METADATA = {
|
|
14
|
+
**Postgres.EXPRESSION_METADATA,
|
|
15
|
+
exp.Neg: {"annotator": annotate_negated_literal},
|
|
16
|
+
}
|
|
9
17
|
NORMALIZE_NOT_NULL = True
|
|
10
18
|
|
|
11
19
|
UNESCAPED_SEQUENCES = {"\\a": "a", "\\v": "v"}
|
|
12
20
|
|
|
13
21
|
class Tokenizer(Postgres.Tokenizer):
|
|
22
|
+
# An ASCII digit after $ starts a parameter. Other characters can start a tag.
|
|
23
|
+
HEREDOC_TAG_PATTERN = re.compile(r"[^0-9$][^$]*")
|
|
14
24
|
UNICODE_IDENTIFIERS = []
|
|
15
25
|
NUMERIC_ESCAPES = {"u": (16, 4, 4, 0xFFFF), "U": (16, 8, 8, 0x10FFFF)}
|
|
16
26
|
|