sqlglot 30.35.0__tar.gz → 30.37.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.35.0 → sqlglot-30.37.0}/CHANGELOG.md +117 -0
- {sqlglot-30.35.0/sqlglot.egg-info → sqlglot-30.37.0}/PKG-INFO +8 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/README.md +5 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/athena.py +3 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/clickhouse.py +1 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/dialect.py +29 -5
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/doris.py +13 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/dremio.py +8 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/duckdb.py +22 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/hive.py +12 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/materialize.py +10 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/mysql.py +1 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/postgres.py +7 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/presto.py +3 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/redshift.py +12 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/risingwave.py +10 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/spark2.py +8 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/sqlite.py +5 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/trino.py +2 -4
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/__init__.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/aggregate.py +2 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/array.py +6 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/core.py +0 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/datatypes.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/functions.py +4 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/query.py +4 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/temporal.py +10 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generator.py +46 -7
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/athena.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/bigquery.py +9 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/clickhouse.py +6 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/databricks.py +3 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/doris.py +157 -5
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/duckdb.py +44 -6
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/exasol.py +3 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/hive.py +1 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/mysql.py +3 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/postgres.py +40 -12
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/presto.py +14 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/redshift.py +2 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/snowflake.py +2 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/spark.py +43 -12
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/spark2.py +0 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/sqlite.py +159 -44
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/teradata.py +1 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/trino.py +47 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/tsql.py +35 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/annotate_types.py +17 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/helpers.py +14 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/merge_subqueries.py +27 -6
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/pushdown_predicates.py +8 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/pushdown_projections.py +5 -5
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/qualify_columns.py +6 -6
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/scope.py +3 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/simplify.py +27 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/unnest_subqueries.py +125 -51
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parser.py +181 -56
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/athena.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/base.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/bigquery.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/clickhouse.py +67 -36
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/databricks.py +7 -7
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/doris.py +67 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/duckdb.py +8 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/exasol.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/materialize.py +5 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/oracle.py +9 -5
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/postgres.py +22 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/presto.py +80 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/redshift.py +2 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/risingwave.py +7 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/snowflake.py +5 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/spark.py +6 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/spark2.py +42 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/trino.py +9 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/tokenizer_core.py +17 -29
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/tokens.py +9 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/transforms.py +32 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/__init__.py +37 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/bigquery.py +15 -0
- sqlglot-30.37.0/sqlglot/typing/dremio.py +30 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/duckdb.py +47 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/hive.py +2 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/postgres.py +8 -1
- sqlglot-30.37.0/sqlglot/typing/presto.py +67 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/spark2.py +2 -0
- sqlglot-30.37.0/sqlglot/typing/sqlite.py +32 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0/sqlglot.egg-info}/PKG-INFO +8 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.egg-info/SOURCES.txt +1 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.egg-info/requires.txt +2 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.egg-info/scm_file_list.json +1 -0
- sqlglot-30.37.0/sqlglot.egg-info/scm_version.json +8 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_bigquery.py +63 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_clickhouse.py +80 -6
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_databricks.py +63 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_dialect.py +5 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_doris.py +238 -13
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_duckdb.py +89 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_materialize.py +4 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_mysql.py +1 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_oracle.py +34 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_postgres.py +86 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_presto.py +54 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_redshift.py +27 -1
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_risingwave.py +6 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_snowflake.py +21 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_spark.py +47 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_sqlite.py +92 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_trino.py +170 -2
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_tsql.py +89 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/annotate_functions.sql +140 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/annotate_types.sql +4 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/merge_subqueries.sql +47 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/optimizer.sql +19 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/pushdown_predicates.sql +9 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/pushdown_projections.sql +8 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/qualify_columns.sql +11 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/simplify.sql +44 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +66 -90
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/unnest_subqueries.sql +118 -3
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_optimizer.py +45 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_parser.py +1 -1
- sqlglot-30.35.0/sqlglot/typing/presto.py +0 -36
- sqlglot-30.35.0/sqlglot/typing/sqlite.py +0 -9
- sqlglot-30.35.0/sqlglot.egg-info/scm_version.json +0 -8
- {sqlglot-30.35.0 → sqlglot-30.37.0}/.gitignore +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/.gitmodules +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/.gitpod.yml +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/AGENTS.md +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/CLAUDE.md +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/CONTRIBUTING.md +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/LICENSE +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/MANIFEST.in +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/Makefile +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/pyproject.toml +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/setup.cfg +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/setup.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/anonymize.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/databricks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/dax.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/spark.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/constraints.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/ddl.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/math.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/expressions/string.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/dax.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/dremio.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/drill.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/oracle.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/canonicalize_internal_names.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/journal.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/dax.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/drill.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/hive.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/mysql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/parsers/tsql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/time.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/clickhouse.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/databricks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/mysql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/snowflake.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglot.png +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglotc/pyproject.toml +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/sqlglotc/setup.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_dax.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_dremio.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_drill.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_exasol.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_hive.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/dialects/test_teradata.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/identity.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/helpers.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_anonymize.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_build.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_diff.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_docs.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_errors.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_executor.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_generator.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_helper.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_lineage.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_optimize_cross_joins.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_schema.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_serde.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_simplify_between.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_sqlglotc.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_time.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_transforms.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_transpile.py +0 -0
- {sqlglot-30.35.0 → sqlglot-30.37.0}/tests/test_typing.py +0 -0
|
@@ -1,6 +1,121 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.36.0] - 2026-12-01
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`2c7c416`](https://github.com/tobymao/sqlglot/commit/2c7c416314cbb366acc30af253f48dff1474f53a) - preserve LIKE function argument order [CODEX] *(PR [#9416](https://github.com/tobymao/sqlglot/pull/9416) by [@georgesittas](https://github.com/georgesittas))*:
|
|
7
|
+
|
|
8
|
+
preserve LIKE function argument order [CODEX] (#9416)
|
|
9
|
+
|
|
10
|
+
- due to [`e9c80d4`](https://github.com/tobymao/sqlglot/commit/e9c80d46f17ec7d1c08085296a7d300831fa9b70) - parse MATCH_RECOGNIZE as a postfix of its relation *(PR [#9402](https://github.com/tobymao/sqlglot/pull/9402) by [@geooo109](https://github.com/geooo109))*:
|
|
11
|
+
|
|
12
|
+
parse MATCH_RECOGNIZE as a postfix of its relation (#9402)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### :bug: Bug Fixes
|
|
16
|
+
- [`d1db7a9`](https://github.com/tobymao/sqlglot/commit/d1db7a9e8b76b0bf6146087cbea5b460cbcaad83) - **optimizer**: don't treat window functions as aggregates when unnesting scalar subqueries *(PR [#9339](https://github.com/tobymao/sqlglot/pull/9339) by [@geooo109](https://github.com/geooo109))*
|
|
17
|
+
- :arrow_lower_right: *fixes issue [#9314](https://github.com/tobymao/sqlglot/issues/9314) opened by [@dayan02dev](https://github.com/dayan02dev)*
|
|
18
|
+
- [`7b7c526`](https://github.com/tobymao/sqlglot/commit/7b7c52660675501ddf4c5d04c5b9d9fbda124b4c) - **spark**: preserve STRING_AGG ordering on older runtimes *(PR [#9325](https://github.com/tobymao/sqlglot/pull/9325) by [@georgesittas](https://github.com/georgesittas))*
|
|
19
|
+
- :arrow_lower_right: *fixes issue [#9308](https://github.com/tobymao/sqlglot/issues/9308) opened by [@jackie-h](https://github.com/jackie-h)*
|
|
20
|
+
- [`5e405bb`](https://github.com/tobymao/sqlglot/commit/5e405bbef15c96f2e1befff06eb6abe64a4683d3) - **trino**: parse and generate bare CURRENT_SCHEMA *(PR [#9356](https://github.com/tobymao/sqlglot/pull/9356) by [@georgesittas](https://github.com/georgesittas))*
|
|
21
|
+
- [`d766930`](https://github.com/tobymao/sqlglot/commit/d766930d827d61d861b8bcee1a6ba8670d2a4b53) - **doris**: preserve ARRAY_FILTER *(PR [#9354](https://github.com/tobymao/sqlglot/pull/9354) by [@geooo109](https://github.com/geooo109))*
|
|
22
|
+
- :arrow_lower_right: *fixes issue [#9352](https://github.com/tobymao/sqlglot/issues/9352) opened by [@matanper](https://github.com/matanper)*
|
|
23
|
+
- [`a0baa22`](https://github.com/tobymao/sqlglot/commit/a0baa2200b77617ece1b7de94b5333a250287861) - **duckdb**: preserve zero-based offsets for named UNNEST values *(PR [#9357](https://github.com/tobymao/sqlglot/pull/9357) by [@georgesittas](https://github.com/georgesittas))*
|
|
24
|
+
- [`438adbf`](https://github.com/tobymao/sqlglot/commit/438adbf2dc362e8e0ede98b781add47725ad5aad) - **doris**: support LARGEINT, IPV4, and IPV6 types *(PR [#9360](https://github.com/tobymao/sqlglot/pull/9360) by [@georgesittas](https://github.com/georgesittas))*
|
|
25
|
+
- :arrow_lower_right: *fixes issue [#9350](https://github.com/tobymao/sqlglot/issues/9350) opened by [@matanper](https://github.com/matanper)*
|
|
26
|
+
- [`c5e479d`](https://github.com/tobymao/sqlglot/commit/c5e479d7e33f0666dd74b9010a6744d7aca568ec) - **doris**: preserve the COLLECT_SET size limit *(PR [#9362](https://github.com/tobymao/sqlglot/pull/9362) by [@georgesittas](https://github.com/georgesittas))*
|
|
27
|
+
- :arrow_lower_right: *fixes issue [#9353](https://github.com/tobymao/sqlglot/issues/9353) opened by [@matanper](https://github.com/matanper)*
|
|
28
|
+
- [`9e4cf21`](https://github.com/tobymao/sqlglot/commit/9e4cf21a6614d402b1afd61ef883dd60f4b35984) - **duckdb**: infer integer literal types by value *(PR [#9342](https://github.com/tobymao/sqlglot/pull/9342) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
29
|
+
- [`785366d`](https://github.com/tobymao/sqlglot/commit/785366d6d18421914385bfb78acbd6f87fa1d4b2) - **doris**: generate native null ordering in ORDER BY *(PR [#9361](https://github.com/tobymao/sqlglot/pull/9361) by [@georgesittas](https://github.com/georgesittas))*
|
|
30
|
+
- :arrow_lower_right: *fixes issue [#9351](https://github.com/tobymao/sqlglot/issues/9351) opened by [@matanper](https://github.com/matanper)*
|
|
31
|
+
- [`c6b4b85`](https://github.com/tobymao/sqlglot/commit/c6b4b85e8c470f071d5bf556511a2fcdafd3b172) - **optimizer**: preserve volatile projection values across rewrites *(PR [#9364](https://github.com/tobymao/sqlglot/pull/9364) by [@georgesittas](https://github.com/georgesittas))*
|
|
32
|
+
- :arrow_lower_right: *fixes issue [#9355](https://github.com/tobymao/sqlglot/issues/9355) opened by [@anishmehta24](https://github.com/anishmehta24)*
|
|
33
|
+
- [`729afd9`](https://github.com/tobymao/sqlglot/commit/729afd969ae43a94fda0e56275cdf3506b7d1fe6) - **optimizer**: preserve comparison strictness when merging equal bounds *(PR [#9363](https://github.com/tobymao/sqlglot/pull/9363) by [@georgesittas](https://github.com/georgesittas))*
|
|
34
|
+
- :arrow_lower_right: *fixes issue [#9349](https://github.com/tobymao/sqlglot/issues/9349) opened by [@1solomonwakhungu](https://github.com/1solomonwakhungu)*
|
|
35
|
+
- [`b152853`](https://github.com/tobymao/sqlglot/commit/b152853448e6cf62b6d177b4bb124f08c511ee0f) - **duckdb**: preserve aliases and comments in UNNEST offset rewrites *(PR [#9359](https://github.com/tobymao/sqlglot/pull/9359) by [@georgesittas](https://github.com/georgesittas))*
|
|
36
|
+
- [`b1896fd`](https://github.com/tobymao/sqlglot/commit/b1896fd0f5d22ff6477a78bddfad34025c6bb687) - **postgres**: preserve zero-based offsets for named UNNEST values *(PR [#9358](https://github.com/tobymao/sqlglot/pull/9358) by [@georgesittas](https://github.com/georgesittas))*
|
|
37
|
+
- [`8f5853c`](https://github.com/tobymao/sqlglot/commit/8f5853c539dec75eb6f55ad79bf678ba4ee91a23) - **trino**: quote reserved keywords used as identifiers *(PR [#9367](https://github.com/tobymao/sqlglot/pull/9367) by [@georgesittas](https://github.com/georgesittas))*
|
|
38
|
+
- :arrow_lower_right: *fixes issue [#9366](https://github.com/tobymao/sqlglot/issues/9366) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
39
|
+
- [`8da47dc`](https://github.com/tobymao/sqlglot/commit/8da47dc5cad9aaae0377226de38d52e0fd364e6d) - **duckdb**: preserve day-of-week numbering across dialects *(PR [#9365](https://github.com/tobymao/sqlglot/pull/9365) by [@georgesittas](https://github.com/georgesittas))*
|
|
40
|
+
- :arrow_lower_right: *fixes issue [#9347](https://github.com/tobymao/sqlglot/issues/9347) opened by [@tushar-mahalya](https://github.com/tushar-mahalya)*
|
|
41
|
+
- [`ebe4585`](https://github.com/tobymao/sqlglot/commit/ebe4585a6839238714b03e0bddc3b251b66d9a37) - **trino**: preserve zero-based offsets for named UNNEST values *(PR [#9371](https://github.com/tobymao/sqlglot/pull/9371) by [@georgesittas](https://github.com/georgesittas))*
|
|
42
|
+
- [`c7a2910`](https://github.com/tobymao/sqlglot/commit/c7a2910ad2ea508455c249da88f4c6037299f0e3) - **bigquery**: preserve JSON types through field and subscript access *(PR [#9348](https://github.com/tobymao/sqlglot/pull/9348) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
43
|
+
- [`e35d465`](https://github.com/tobymao/sqlglot/commit/e35d4651ac99cca5cb99b9850ecb7e6354568d44) - **tsql**: translate PostgreSQL DOW and DOY extraction [CODEX] *(PR [#9376](https://github.com/tobymao/sqlglot/pull/9376) by [@georgesittas](https://github.com/georgesittas))*
|
|
44
|
+
- :arrow_lower_right: *fixes issue [#9368](https://github.com/tobymao/sqlglot/issues/9368) opened by [@rahul05ranjan](https://github.com/rahul05ranjan)*
|
|
45
|
+
- [`0c79658`](https://github.com/tobymao/sqlglot/commit/0c79658d34b54ae7614472d4287d610d7fb052cd) - **doris**: support array value constructors *(PR [#9379](https://github.com/tobymao/sqlglot/pull/9379) by [@geooo109](https://github.com/geooo109))*
|
|
46
|
+
- :arrow_lower_right: *fixes issue [#9377](https://github.com/tobymao/sqlglot/issues/9377) opened by [@Ragnaroos](https://github.com/Ragnaroos)*
|
|
47
|
+
- [`43a4a49`](https://github.com/tobymao/sqlglot/commit/43a4a49bb11e8ad92f53410fc5c33774bbebf3da) - **postgres**: parse EVERY as a boolean aggregate [CODEX] *(PR [#9381](https://github.com/tobymao/sqlglot/pull/9381) by [@georgesittas](https://github.com/georgesittas))*
|
|
48
|
+
- :arrow_lower_right: *fixes issue [#9378](https://github.com/tobymao/sqlglot/issues/9378) opened by [@Ragnaroos](https://github.com/Ragnaroos)*
|
|
49
|
+
- [`0a27bf8`](https://github.com/tobymao/sqlglot/commit/0a27bf8a5d05e0ea7e0c75ff149339c3be46d6cd) - **clickhouse**: parse usernames in view DEFINER clauses *(PR [#9382](https://github.com/tobymao/sqlglot/pull/9382) by [@georgesittas](https://github.com/georgesittas))*
|
|
50
|
+
- :arrow_lower_right: *fixes issue [#9380](https://github.com/tobymao/sqlglot/issues/9380) opened by [@ne1r0n](https://github.com/ne1r0n)*
|
|
51
|
+
- [`c32d7e3`](https://github.com/tobymao/sqlglot/commit/c32d7e36c6d36caf17dd85e25675affff33568eb) - **databricks**: distinguish CURRENT_PATH from column references *(PR [#9374](https://github.com/tobymao/sqlglot/pull/9374) by [@georgesittas](https://github.com/georgesittas))*
|
|
52
|
+
- :arrow_lower_right: *fixes issue [#9370](https://github.com/tobymao/sqlglot/issues/9370) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
53
|
+
- [`fb46cd7`](https://github.com/tobymao/sqlglot/commit/fb46cd784028f4c980b825245cfbdea41461ef86) - **sqlite**: translate EXTRACT for calendar date parts [CODEX] *(PR [#9386](https://github.com/tobymao/sqlglot/pull/9386) by [@georgesittas](https://github.com/georgesittas))*
|
|
54
|
+
- :arrow_lower_right: *fixes issue [#9385](https://github.com/tobymao/sqlglot/issues/9385) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
55
|
+
- [`ba06510`](https://github.com/tobymao/sqlglot/commit/ba0651085c690b8b49e9b9dba2f4a37dbb9055e0) - **postgres**: infer integer literal types by value *(PR [#9373](https://github.com/tobymao/sqlglot/pull/9373) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
56
|
+
- [`e27077c`](https://github.com/tobymao/sqlglot/commit/e27077c9a0e4872447644bbf9ec2c8abc5a1796b) - **sqlite**: infer integer literal types by value *(PR [#9389](https://github.com/tobymao/sqlglot/pull/9389) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
57
|
+
- [`f0c46bb`](https://github.com/tobymao/sqlglot/commit/f0c46bb219badeabfd0c31dfbd457973d67ffac5) - **clickhouse**: parse ARRAY JOIN operands as expressions *(PR [#9397](https://github.com/tobymao/sqlglot/pull/9397) by [@georgesittas](https://github.com/georgesittas))*
|
|
58
|
+
- :arrow_lower_right: *fixes issue [#9387](https://github.com/tobymao/sqlglot/issues/9387) opened by [@ne1r0n](https://github.com/ne1r0n)*
|
|
59
|
+
- [`ab03a26`](https://github.com/tobymao/sqlglot/commit/ab03a263d80e65e546dd723c743260bdec5cb9e8) - **clickhouse**: render nested JSON selections without a write dialect *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
60
|
+
- [`eef45a5`](https://github.com/tobymao/sqlglot/commit/eef45a566c8cf764dff6a20ca7068e3cdab33b08) - **doris**: preserve PostgreSQL ARRAY_AGG null semantics [CODEX] *(PR [#9399](https://github.com/tobymao/sqlglot/pull/9399) by [@georgesittas](https://github.com/georgesittas))*
|
|
61
|
+
- :arrow_lower_right: *fixes issue [#9393](https://github.com/tobymao/sqlglot/issues/9393) opened by [@Ragnaroos](https://github.com/Ragnaroos)*
|
|
62
|
+
- [`70a5027`](https://github.com/tobymao/sqlglot/commit/70a5027e8637e28225577260e2f532da9c9821f2) - **doris**: rewrite filters on ordinary aggregates *(PR [#9400](https://github.com/tobymao/sqlglot/pull/9400) by [@georgesittas](https://github.com/georgesittas))*
|
|
63
|
+
- :arrow_lower_right: *fixes issue [#9392](https://github.com/tobymao/sqlglot/issues/9392) opened by [@Ragnaroos](https://github.com/Ragnaroos)*
|
|
64
|
+
- [`c891883`](https://github.com/tobymao/sqlglot/commit/c891883e936dbeae7fb8af84ec96d43ac4dcbda0) - **postgres**: distinguish positional parameters from dollar-quoted strings [CODEX] *(PR [#9401](https://github.com/tobymao/sqlglot/pull/9401) by [@georgesittas](https://github.com/georgesittas))*
|
|
65
|
+
- :arrow_lower_right: *fixes issue [#9396](https://github.com/tobymao/sqlglot/issues/9396) opened by [@shaurya-nstarx](https://github.com/shaurya-nstarx)*
|
|
66
|
+
- [`5d6f7f0`](https://github.com/tobymao/sqlglot/commit/5d6f7f0bd21a47b372c3b83948aa563fc0dfcbd7) - **bigquery**: infer GEOGRAPHY for ST_GEOGFROMGEOJSON *(PR [#9390](https://github.com/tobymao/sqlglot/pull/9390) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
67
|
+
- [`1bd4f3c`](https://github.com/tobymao/sqlglot/commit/1bd4f3c5c05ac3a6c68c7fad995544b8a8066b5a) - **optimizer**: annotate CURRENT_TIMESTAMP as TIMESTAMPTZ for Presto/Trino *(PR [#9412](https://github.com/tobymao/sqlglot/pull/9412) by [@VaggelisD](https://github.com/VaggelisD))*
|
|
68
|
+
- [`2c7c416`](https://github.com/tobymao/sqlglot/commit/2c7c416314cbb366acc30af253f48dff1474f53a) - **postgres**: preserve LIKE function argument order [CODEX] *(PR [#9416](https://github.com/tobymao/sqlglot/pull/9416) by [@georgesittas](https://github.com/georgesittas))*
|
|
69
|
+
- :arrow_lower_right: *fixes issue [#9406](https://github.com/tobymao/sqlglot/issues/9406) opened by [@laravioli](https://github.com/laravioli)*
|
|
70
|
+
- [`ed5b9f9`](https://github.com/tobymao/sqlglot/commit/ed5b9f9b42c7ee7005da86dc8e34cff1387f23d5) - **postgres**: preserve the <=> extension operator *(PR [#9417](https://github.com/tobymao/sqlglot/pull/9417) by [@georgesittas](https://github.com/georgesittas))*
|
|
71
|
+
- :arrow_lower_right: *fixes issue [#9408](https://github.com/tobymao/sqlglot/issues/9408) opened by [@laravioli](https://github.com/laravioli)*
|
|
72
|
+
- [`e9c80d4`](https://github.com/tobymao/sqlglot/commit/e9c80d46f17ec7d1c08085296a7d300831fa9b70) - **parser**: parse MATCH_RECOGNIZE as a postfix of its relation *(PR [#9402](https://github.com/tobymao/sqlglot/pull/9402) by [@geooo109](https://github.com/geooo109))*
|
|
73
|
+
- [`a4c3e5e`](https://github.com/tobymao/sqlglot/commit/a4c3e5e5b90e994b3a3fb7e1eb73a88940de3f9a) - **sqlite**: compare dates with interval arithmetic results as datetimes *(PR [#9419](https://github.com/tobymao/sqlglot/pull/9419) by [@georgesittas](https://github.com/georgesittas))*
|
|
74
|
+
- :arrow_lower_right: *fixes issue [#9391](https://github.com/tobymao/sqlglot/issues/9391) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
75
|
+
- [`cce8bd3`](https://github.com/tobymao/sqlglot/commit/cce8bd3bf7a884428b0df9402f57427bb3b09e71) - **hive**: infer integer literal types by value in Hive and Spark [CODEX] *(PR [#9398](https://github.com/tobymao/sqlglot/pull/9398) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
76
|
+
- [`ab8753a`](https://github.com/tobymao/sqlglot/commit/ab8753a25bcbf03db96f97509959c58a3f19b7d1) - **dremio**: infer integer literal types for Dremio *(PR [#9424](https://github.com/tobymao/sqlglot/pull/9424) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
77
|
+
- [`e356698`](https://github.com/tobymao/sqlglot/commit/e356698c9e1e485d9623589ae438f316f672700b) - **spark**: parse OUTER/INNER/CROSS as identifiers and expressions in PIVOT aggregations *(PR [#9442](https://github.com/tobymao/sqlglot/pull/9442) by [@georgesittas](https://github.com/georgesittas))*
|
|
78
|
+
|
|
79
|
+
### :white_check_mark: Tests
|
|
80
|
+
- [`99e5419`](https://github.com/tobymao/sqlglot/commit/99e541939f9fd901a16ba201009f97c041740f75) - **postgres**: sync EVERY round-trip fixtures *(PR [#9383](https://github.com/tobymao/sqlglot/pull/9383) by [@georgesittas](https://github.com/georgesittas))*
|
|
81
|
+
|
|
82
|
+
### :wrench: Chores
|
|
83
|
+
- [`5794340`](https://github.com/tobymao/sqlglot/commit/5794340b6e4806fdac6316ee1c6d27ed065bb69c) - bump integration tests to the merged Redshift fixtures *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
84
|
+
- [`adb6997`](https://github.com/tobymao/sqlglot/commit/adb699743ae1645a040f5df815c0ed7d5f0c7347) - sync integration tests after Databricks fixture refresh *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
85
|
+
- [`4456240`](https://github.com/tobymao/sqlglot/commit/445624097edf0f63c222997a05e1d1cd903f6e74) - sync integration tests after BigQuery JSON type fix *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
86
|
+
- [`ec95a02`](https://github.com/tobymao/sqlglot/commit/ec95a02def0f1b61e953b93d23521b18596f1fbe) - sync integration tests *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
87
|
+
- [`73a4eab`](https://github.com/tobymao/sqlglot/commit/73a4eab6d25c5807f4049755726a4f6db5258232) - sync integration tests after SQLite literal typing *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
88
|
+
- [`4580280`](https://github.com/tobymao/sqlglot/commit/45802806e059a0e03577a7c4787364cffd022c71) - sync integration tests after BigQuery geography typing *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
89
|
+
- [`4e11e31`](https://github.com/tobymao/sqlglot/commit/4e11e316d1215d06d1a9a2a5a66586bccdfc5a95) - sync integration tests after BigQuery fixture update *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## [v30.35.0] - 2026-11-24
|
|
93
|
+
### :sparkles: New Features
|
|
94
|
+
- [`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))*
|
|
95
|
+
|
|
96
|
+
### :bug: Bug Fixes
|
|
97
|
+
- [`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))*
|
|
98
|
+
- [`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))*
|
|
99
|
+
- [`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))*
|
|
100
|
+
- :arrow_lower_right: *fixes issue [#9275](https://github.com/tobymao/sqlglot/issues/9275) opened by [@mazum21](https://github.com/mazum21)*
|
|
101
|
+
- [`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))*
|
|
102
|
+
- :arrow_lower_right: *fixes issue [#9309](https://github.com/tobymao/sqlglot/issues/9309) opened by [@joeharris76](https://github.com/joeharris76)*
|
|
103
|
+
- [`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))*
|
|
104
|
+
- [`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))*
|
|
105
|
+
- :arrow_lower_right: *fixes issue [#9277](https://github.com/tobymao/sqlglot/issues/9277) opened by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog)*
|
|
106
|
+
- [`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))*
|
|
107
|
+
- :arrow_lower_right: *fixes issue [#9338](https://github.com/tobymao/sqlglot/issues/9338) opened by [@travishofmeister](https://github.com/travishofmeister)*
|
|
108
|
+
- [`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))*
|
|
109
|
+
- :arrow_lower_right: *fixes issue [#9336](https://github.com/tobymao/sqlglot/issues/9336) opened by [@mday-io](https://github.com/mday-io)*
|
|
110
|
+
- [`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))*
|
|
111
|
+
- [`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))*
|
|
112
|
+
- :arrow_lower_right: *fixes issue [#9341](https://github.com/tobymao/sqlglot/issues/9341) opened by [@tushar-mahalya](https://github.com/tushar-mahalya)*
|
|
113
|
+
- [`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))*
|
|
114
|
+
|
|
115
|
+
### :wrench: Chores
|
|
116
|
+
- [`5f34117`](https://github.com/tobymao/sqlglot/commit/5f341179474af86926b86306737b135b63ef1a66) - bump integration tests to the merged BigQuery DATETIME fixtures *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
117
|
+
|
|
118
|
+
|
|
4
119
|
## [v30.34.0] - 2026-11-23
|
|
5
120
|
### :boom: BREAKING CHANGES
|
|
6
121
|
- 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))*:
|
|
@@ -17037,3 +17152,5 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
17037
17152
|
[v30.32.0]: https://github.com/tobymao/sqlglot/compare/v30.31.0...v30.32.0
|
|
17038
17153
|
[v30.33.0]: https://github.com/tobymao/sqlglot/compare/v30.32.0...v30.33.0
|
|
17039
17154
|
[v30.34.0]: https://github.com/tobymao/sqlglot/compare/v30.33.0...v30.34.0
|
|
17155
|
+
[v30.35.0]: https://github.com/tobymao/sqlglot/compare/v30.34.0...v30.35.0
|
|
17156
|
+
[v30.36.0]: https://github.com/tobymao/sqlglot/compare/v30.35.0...v30.36.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.37.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.37.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.37.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.37.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 37, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ga7124cf8e'
|
|
@@ -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.
|
|
@@ -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
|
|
@@ -1411,7 +1412,10 @@ class Dialect(metaclass=_Dialect):
|
|
|
1411
1412
|
]
|
|
1412
1413
|
|
|
1413
1414
|
def int_literal_type(self, expression: exp.Literal) -> exp.DataType | exp.DType:
|
|
1414
|
-
|
|
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."""
|
|
1415
1419
|
for bound, int_type in self.INT_LITERAL_TYPES:
|
|
1416
1420
|
if bound is None or value <= bound:
|
|
1417
1421
|
return int_type
|
|
@@ -1852,7 +1856,8 @@ def var_map_sql(
|
|
|
1852
1856
|
values = expression.args.get("values")
|
|
1853
1857
|
|
|
1854
1858
|
if not isinstance(keys, exp.Array) or not isinstance(values, exp.Array):
|
|
1855
|
-
|
|
1859
|
+
if keys is not None or values is not None:
|
|
1860
|
+
self.unsupported("Cannot convert array columns into map.")
|
|
1856
1861
|
return self.func(map_func_name, keys, values)
|
|
1857
1862
|
|
|
1858
1863
|
args = []
|
|
@@ -1916,6 +1921,21 @@ def months_between_sql(self: Generator, expression: exp.MonthsBetween) -> str:
|
|
|
1916
1921
|
return self.sql(result)
|
|
1917
1922
|
|
|
1918
1923
|
|
|
1924
|
+
def build_array_lambda_func(
|
|
1925
|
+
exp_class: Type[E], name: str, *, supports_mask: bool = False
|
|
1926
|
+
) -> t.Callable[[list[exp.Expr]], E | exp.Anonymous]:
|
|
1927
|
+
def _builder(args: list[exp.Expr]) -> E | exp.Anonymous:
|
|
1928
|
+
predicate = seq_get(args, 0)
|
|
1929
|
+
is_mask = supports_mask and not isinstance(predicate, exp.Lambda)
|
|
1930
|
+
if is_mask or len(args) > 2:
|
|
1931
|
+
# The shared expression represents a lambda over a single array.
|
|
1932
|
+
return exp.Anonymous(this=name, expressions=args)
|
|
1933
|
+
|
|
1934
|
+
return exp_class(this=seq_get(args, 1), expression=predicate)
|
|
1935
|
+
|
|
1936
|
+
return _builder
|
|
1937
|
+
|
|
1938
|
+
|
|
1919
1939
|
def build_formatted_time(
|
|
1920
1940
|
exp_class: Type[E], dialect_override: str | None = None, default: bool | str | None = None
|
|
1921
1941
|
) -> t.Callable[[BuilderArgs, Dialect], E]:
|
|
@@ -2107,6 +2127,10 @@ def timestrtotime_sql(
|
|
|
2107
2127
|
return self.sql(exp.cast(expression.this, datatype, dialect=self.dialect))
|
|
2108
2128
|
|
|
2109
2129
|
|
|
2130
|
+
def build_dayofweek_zero_based(args: BuilderArgs) -> exp.DayOfWeek:
|
|
2131
|
+
return exp.DayOfWeek(this=seq_get(args, 0), zero_based=True)
|
|
2132
|
+
|
|
2133
|
+
|
|
2110
2134
|
def datestrtodate_sql(self: Generator, expression: exp.DateStrToDate) -> str:
|
|
2111
2135
|
return self.sql(exp.cast(expression.this, exp.DType.DATE))
|
|
2112
2136
|
|
|
@@ -2422,10 +2446,10 @@ def ts_or_ds_add_cast(expression: exp.TsOrDsAdd) -> exp.TsOrDsAdd:
|
|
|
2422
2446
|
|
|
2423
2447
|
|
|
2424
2448
|
def remove_ts_or_ds_to_date(
|
|
2425
|
-
to_sql: t.Callable[[Generator,
|
|
2449
|
+
to_sql: t.Callable[[Generator, F], str] | None = None,
|
|
2426
2450
|
args: tuple[str, ...] = ("this",),
|
|
2427
|
-
) -> t.Callable[[Generator,
|
|
2428
|
-
def func(self: Generator, expression:
|
|
2451
|
+
) -> t.Callable[[Generator, F], str]:
|
|
2452
|
+
def func(self: Generator, expression: F) -> str:
|
|
2429
2453
|
for arg_key in args:
|
|
2430
2454
|
arg = expression.args.get(arg_key)
|
|
2431
2455
|
if isinstance(arg, (exp.TsOrDsToDate, exp.TsOrDsToTimestamp)) and not arg.args.get(
|
|
@@ -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,18 @@ 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
|
+
"DATETIMEV2": TokenType.DATETIME,
|
|
28
|
+
"DATEV2": TokenType.DATE,
|
|
29
|
+
"DECIMALV2": TokenType.DECIMAL,
|
|
30
|
+
"DECIMALV3": TokenType.DECIMAL,
|
|
31
|
+
"IPV4": TokenType.IPV4,
|
|
32
|
+
"IPV6": TokenType.IPV6,
|
|
33
|
+
"LARGEINT": TokenType.INT128,
|
|
34
|
+
"TIMESTAMP": TokenType.DATETIME,
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
Parser = DorisParser
|
|
25
38
|
|
|
26
39
|
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
|
|
@@ -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
|
|
|
@@ -9,6 +9,13 @@ from sqlglot.typing.postgres import EXPRESSION_METADATA
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Postgres(Dialect):
|
|
12
|
+
INT_LITERAL_TYPES: tuple[tuple[int | None, exp.DType], ...] = (
|
|
13
|
+
(-(2**63) - 1, exp.DType.DECIMAL),
|
|
14
|
+
(-(2**31) - 1, exp.DType.BIGINT),
|
|
15
|
+
(2**31 - 1, exp.DType.INT),
|
|
16
|
+
(2**63 - 1, exp.DType.BIGINT),
|
|
17
|
+
(None, exp.DType.DECIMAL),
|
|
18
|
+
)
|
|
12
19
|
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
13
20
|
INDEX_OFFSET = 1
|
|
14
21
|
ASCII_ONLY_NORMALIZATION = True
|
|
@@ -50,6 +50,7 @@ class Presto(Dialect):
|
|
|
50
50
|
JODA_TIME_MAPPING = {
|
|
51
51
|
"yyyy": "%Y",
|
|
52
52
|
"yy": "%y",
|
|
53
|
+
"y": "%-Y",
|
|
53
54
|
"MMMM": "%B",
|
|
54
55
|
"MMM": "%b",
|
|
55
56
|
"MM": "%m",
|
|
@@ -96,6 +97,8 @@ class Presto(Dialect):
|
|
|
96
97
|
|
|
97
98
|
NESTED_COMMENTS = False
|
|
98
99
|
|
|
100
|
+
COMMANDS = tokens.Tokenizer.COMMANDS - {TokenType.SHOW}
|
|
101
|
+
|
|
99
102
|
KEYWORDS = {
|
|
100
103
|
**tokens.Tokenizer.KEYWORDS,
|
|
101
104
|
"DEALLOCATE PREPARE": TokenType.COMMAND,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from sqlglot import exp
|
|
3
4
|
from sqlglot.typing.redshift import EXPRESSION_METADATA
|
|
4
5
|
from sqlglot.dialects.dialect import NormalizationStrategy
|
|
5
6
|
from sqlglot.dialects.postgres import Postgres
|
|
@@ -9,6 +10,17 @@ from sqlglot.tokens import TokenType
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class Redshift(Postgres):
|
|
13
|
+
# Keep the INT fallback for DECIMAL-sized integers outside BIGINT.
|
|
14
|
+
INT_LITERAL_TYPES = (
|
|
15
|
+
(-(10**38), exp.DType.DOUBLE),
|
|
16
|
+
(-(2**63) - 1, exp.DType.INT),
|
|
17
|
+
(-(2**31), exp.DType.BIGINT), # Redshift types the signed 32-bit minimum as BIGINT.
|
|
18
|
+
(2**31 - 1, exp.DType.INT),
|
|
19
|
+
(2**63 - 1, exp.DType.BIGINT),
|
|
20
|
+
(10**38 - 1, exp.DType.INT),
|
|
21
|
+
(None, exp.DType.DOUBLE),
|
|
22
|
+
)
|
|
23
|
+
|
|
12
24
|
# https://docs.aws.amazon.com/redshift/latest/dg/r_names.html
|
|
13
25
|
NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_INSENSITIVE
|
|
14
26
|
|
|
@@ -1,12 +1,20 @@
|
|
|
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.risingwave import RisingWaveGenerator
|
|
5
8
|
from sqlglot.parsers.risingwave import RisingWaveParser
|
|
6
9
|
from sqlglot.tokens import TokenType
|
|
10
|
+
from sqlglot.typing import annotate_negated_literal
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
class RisingWave(Postgres):
|
|
14
|
+
EXPRESSION_METADATA = {
|
|
15
|
+
**Postgres.EXPRESSION_METADATA,
|
|
16
|
+
exp.Neg: {"annotator": annotate_negated_literal},
|
|
17
|
+
}
|
|
10
18
|
NORMALIZE_NOT_NULL = True
|
|
11
19
|
|
|
12
20
|
REQUIRES_PARENTHESIZED_STRUCT_ACCESS = True
|
|
@@ -15,6 +23,8 @@ class RisingWave(Postgres):
|
|
|
15
23
|
UNESCAPED_SEQUENCES = {"\\a": "a", "\\v": "v"}
|
|
16
24
|
|
|
17
25
|
class Tokenizer(Postgres.Tokenizer):
|
|
26
|
+
# RisingWave 3.0 accepts alphanumeric tags with a leading digit.
|
|
27
|
+
HEREDOC_TAG_PATTERN = re.compile(r"\w+")
|
|
18
28
|
UNICODE_IDENTIFIERS = []
|
|
19
29
|
|
|
20
30
|
KEYWORDS = {
|
|
@@ -10,6 +10,14 @@ from sqlglot.typing.spark2 import EXPRESSION_METADATA
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Spark2(Hive):
|
|
13
|
+
# Spark includes a direct minus in the literal and rejects precision above 38.
|
|
14
|
+
INT_LITERAL_TYPES = (
|
|
15
|
+
(-(2**63) - 1, exp.DType.INT),
|
|
16
|
+
(-(2**31) - 1, exp.DType.BIGINT),
|
|
17
|
+
(2**31 - 1, exp.DType.INT),
|
|
18
|
+
(2**63 - 1, exp.DType.BIGINT),
|
|
19
|
+
(None, exp.DType.INT),
|
|
20
|
+
)
|
|
13
21
|
ALTER_TABLE_SUPPORTS_CASCADE = False
|
|
14
22
|
COLUMN_ALIAS_PRECEDENCE = {
|
|
15
23
|
**Hive.COLUMN_ALIAS_PRECEDENCE,
|
|
@@ -32,6 +32,11 @@ class SQLite(Dialect):
|
|
|
32
32
|
FOLD_MIXED_TEMPORAL_COMPARISONS = False
|
|
33
33
|
INTERSECT_BINDS_TIGHTER_THAN_UNION_AND_EXCEPT = False
|
|
34
34
|
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
|
|
35
|
+
INT_LITERAL_TYPES = (
|
|
36
|
+
(-(2**63) - 1, exp.DType.DOUBLE),
|
|
37
|
+
(2**63 - 1, exp.DType.INT),
|
|
38
|
+
(None, exp.DType.DOUBLE),
|
|
39
|
+
)
|
|
35
40
|
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
36
41
|
|
|
37
42
|
TIME_MAPPING = {
|
|
@@ -11,15 +11,13 @@ class Trino(Presto):
|
|
|
11
11
|
SUPPORTS_USER_DEFINED_TYPES = False
|
|
12
12
|
LOG_BASE_FIRST = True
|
|
13
13
|
CONCAT_WS_COALESCE = True
|
|
14
|
+
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = True
|
|
14
15
|
|
|
15
16
|
def int_literal_type(self, expression: exp.Literal) -> exp.DataType | exp.DType:
|
|
16
17
|
value = int(expression.to_py())
|
|
17
18
|
if isinstance(expression.parent, exp.Neg):
|
|
18
19
|
value -= 1
|
|
19
|
-
|
|
20
|
-
if bound is None or value <= bound:
|
|
21
|
-
return int_type
|
|
22
|
-
return exp.DType.INT
|
|
20
|
+
return self.integer_type_for_value(value)
|
|
23
21
|
|
|
24
22
|
class Tokenizer(Presto.Tokenizer):
|
|
25
23
|
COMMANDS = Presto.Tokenizer.COMMANDS - {TokenType.EXECUTE}
|
|
@@ -52,3 +52,5 @@ EXPR_CLASSES: dict[str, type[Expr]] = {cls.key: cls for cls in subclasses(__name
|
|
|
52
52
|
|
|
53
53
|
# Functions that can return multiple rows. We include anonymous functions conservatively.
|
|
54
54
|
SET_RETURNING_FUNCTIONS = (Anonymous, UDTF, ExplodingGenerateSeries)
|
|
55
|
+
|
|
56
|
+
NONDETERMINISTIC_FUNCTIONS = (Rand, Randn, Uuid)
|
|
@@ -75,7 +75,7 @@ class ArgMin(Expression, AggFunc):
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
class ArrayAgg(Expression, AggFunc):
|
|
78
|
-
arg_types = {"this": True, "nulls_excluded": False}
|
|
78
|
+
arg_types = {"this": True, "nulls_excluded": False, "null_on_empty": False}
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
class ArrayConcatAgg(Expression, AggFunc):
|
|
@@ -143,6 +143,7 @@ class GroupConcat(Expression, AggFunc):
|
|
|
143
143
|
"separator": False,
|
|
144
144
|
"on_overflow": False,
|
|
145
145
|
"null_separator_is_empty": False,
|
|
146
|
+
"empty_string_on_empty": False,
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
|