sqlglot 30.12.0__tar.gz → 30.13.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.12.0 → sqlglot-30.13.0}/CHANGELOG.md +117 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/CONTRIBUTING.md +26 -0
- {sqlglot-30.12.0/sqlglot.egg-info → sqlglot-30.13.0}/PKG-INFO +5 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/README.md +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/setup.py +1 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/_version.py +3 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/__init__.py +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/clickhouse.py +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/databricks.py +2 -0
- sqlglot-30.13.0/sqlglot/dialects/dax.py +20 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/dialect.py +63 -7
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/dremio.py +6 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/hive.py +3 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/postgres.py +5 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/spark.py +3 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/spark2.py +3 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/aggregate.py +5 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/constraints.py +5 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/ddl.py +1 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/math.py +4 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/string.py +11 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/temporal.py +14 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generator.py +27 -15
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/bigquery.py +30 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/databricks.py +13 -0
- sqlglot-30.13.0/sqlglot/generators/dax.py +7 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/dremio.py +8 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/drill.py +17 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/duckdb.py +29 -59
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/hive.py +78 -27
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/oracle.py +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/postgres.py +8 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/presto.py +64 -5
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/snowflake.py +57 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/spark.py +0 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/spark2.py +23 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/sqlite.py +6 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/trino.py +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/tsql.py +5 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/annotate_types.py +22 -8
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/canonicalize_internal_names.py +19 -6
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/merge_subqueries.py +98 -18
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/pushdown_predicates.py +4 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/pushdown_projections.py +18 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/qualify_columns.py +84 -22
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/resolver.py +23 -10
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/scope.py +4 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/simplify.py +2 -5
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parser.py +114 -51
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/bigquery.py +32 -18
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/clickhouse.py +10 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/databricks.py +15 -0
- sqlglot-30.13.0/sqlglot/parsers/dax.py +48 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/drill.py +8 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/duckdb.py +4 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/exasol.py +1 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/hive.py +2 -18
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/mysql.py +3 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/oracle.py +5 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/presto.py +6 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/snowflake.py +5 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/spark2.py +1 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/tsql.py +10 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/time.py +23 -23
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/tokenizer_core.py +12 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/tokens.py +8 -24
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/__init__.py +1 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/clickhouse.py +5 -0
- sqlglot-30.13.0/sqlglot/typing/databricks.py +38 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/duckdb.py +7 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/hive.py +4 -1
- sqlglot-30.13.0/sqlglot/typing/mysql.py +79 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/snowflake.py +0 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0/sqlglot.egg-info}/PKG-INFO +5 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.egg-info/SOURCES.txt +5 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.egg-info/requires.txt +3 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.egg-info/scm_file_list.json +277 -272
- sqlglot-30.13.0/sqlglot.egg-info/scm_version.json +8 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglotc/pyproject.toml +2 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglotc/setup.py +7 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_bigquery.py +75 -6
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_clickhouse.py +25 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_databricks.py +10 -0
- sqlglot-30.13.0/tests/dialects/test_dax.py +55 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_dialect.py +82 -8
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_dremio.py +33 -0
- sqlglot-30.13.0/tests/dialects/test_drill.py +65 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_duckdb.py +70 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_exasol.py +8 -8
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_hive.py +7 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_mysql.py +2 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_oracle.py +23 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_postgres.py +56 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_presto.py +47 -6
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_redshift.py +6 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_snowflake.py +54 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_spark.py +57 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_sqlite.py +14 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_teradata.py +2 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_trino.py +11 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_tsql.py +8 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/identity.sql +24 -3
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/annotate_functions.sql +421 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/merge_subqueries.sql +69 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/optimizer.sql +1 -1
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/pushdown_predicates.sql +12 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/pushdown_projections.sql +4 -4
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/qualify_columns.sql +37 -2
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/simplify.sql +6 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_optimizer.py +232 -5
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_parser.py +103 -0
- sqlglot-30.13.0/tests/test_time.py +76 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_transpile.py +16 -0
- sqlglot-30.12.0/sqlglot/typing/mysql.py +0 -36
- sqlglot-30.12.0/sqlglot.egg-info/scm_version.json +0 -8
- sqlglot-30.12.0/tests/dialects/test_drill.py +0 -25
- sqlglot-30.12.0/tests/test_time.py +0 -34
- {sqlglot-30.12.0 → sqlglot-30.13.0}/.gitignore +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/.gitmodules +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/.gitpod.yml +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/.pre-commit-config.yaml +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/AGENTS.md +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/CLAUDE.md +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/LICENSE +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/MANIFEST.in +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/Makefile +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/pyproject.toml +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/setup.cfg +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/__main__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/_typing.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/athena.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/bigquery.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/doris.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/drill.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/druid.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/duckdb.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/dune.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/exasol.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/fabric.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/materialize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/mysql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/oracle.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/presto.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/prql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/redshift.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/risingwave.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/singlestore.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/snowflake.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/solr.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/sqlite.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/starrocks.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/tableau.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/teradata.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/trino.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/dialects/tsql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/diff.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/errors.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/executor/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/executor/context.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/executor/env.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/executor/python.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/executor/table.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/array.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/builders.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/core.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/dml.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/functions.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/json.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/properties.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/expressions/query.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/athena.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/clickhouse.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/doris.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/druid.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/dune.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/exasol.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/fabric.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/materialize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/mysql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/prql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/python.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/redshift.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/risingwave.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/singlestore.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/solr.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/starrocks.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/tableau.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/generators/teradata.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/helper.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/jsonpath.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/lineage.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/canonicalize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/eliminate_ctes.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/eliminate_joins.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/eliminate_subqueries.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/normalize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/optimize_joins.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/optimizer.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/optimizer/unnest_subqueries.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/athena.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/base.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/doris.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/dremio.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/druid.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/dune.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/fabric.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/materialize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/postgres.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/prql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/redshift.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/solr.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/spark.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/tableau.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/teradata.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/parsers/trino.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/planner.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/py.typed +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/schema.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/serde.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/transforms.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/trie.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/bigquery.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/postgres.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/presto.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/redshift.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/spark.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/spark2.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot/typing/tsql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.egg-info/dependency_links.txt +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.egg-info/top_level.txt +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglot.png +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/sqlglotc/MANIFEST.in +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_athena.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_doris.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_druid.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_dune.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_fabric.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_materialize.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_pipe_syntax.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_prql.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_risingwave.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_singlestore.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_solr.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_starrocks.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/dialects/test_tableau.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/jsonpath/LICENSE +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/jsonpath/cts.json +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/annotate_types.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/canonicalize.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/canonicalize_internal_names.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/eliminate_ctes.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/eliminate_joins.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/eliminate_subqueries.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/isolate_table_selects.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/normalize.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/normalize_identifiers.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/optimize_joins.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/pushdown_cte_alias_columns.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/qualify_columns__invalid.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/qualify_columns__with_invisible.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/qualify_columns_ddl.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/qualify_tables.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/quote_identifiers.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/item.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/store.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/customer.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/lineitem.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/nation.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/orders.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/part.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/partsupp.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/region.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/supplier.csv.gz +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/tpc-h/tpc-h.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/optimizer/unnest_subqueries.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/partial.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/fixtures/pretty.sql +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/gen_fixtures.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/helpers.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/leakcheck.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/sqlglot/__init__.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_build.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_dialect_entry_points.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_dialect_imports.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_diff.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_docs.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_errors.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_executor.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_expressions.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_generator.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_helper.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_integration_loader.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_jsonpath.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_lineage.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_schema.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_serde.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_tokens.py +0 -0
- {sqlglot-30.12.0 → sqlglot-30.13.0}/tests/test_transforms.py +0 -0
|
@@ -1,6 +1,122 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [v30.12.0] - 2026-06-26
|
|
5
|
+
### :boom: BREAKING CHANGES
|
|
6
|
+
- due to [`d0ebc83`](https://github.com/tobymao/sqlglot/commit/d0ebc8353a3be4eb3258a9e078cc5e124c0e8c78) - Annotate MINUTE function *(PR [#7747](https://github.com/tobymao/sqlglot/pull/7747) by [@vishvambhar-ranoshe](https://github.com/vishvambhar-ranoshe))*:
|
|
7
|
+
|
|
8
|
+
Annotate MINUTE function (#7747)
|
|
9
|
+
|
|
10
|
+
- due to [`2e7f8b7`](https://github.com/tobymao/sqlglot/commit/2e7f8b7e6eea5301a902bacf09e00f853e6c77b5) - add UNDROP support for all Snowflake Time Travel object types *(PR [#7735](https://github.com/tobymao/sqlglot/pull/7735) by [@Danielhaiman](https://github.com/Danielhaiman))*:
|
|
11
|
+
|
|
12
|
+
add UNDROP support for all Snowflake Time Travel object types (#7735)
|
|
13
|
+
|
|
14
|
+
- due to [`87b1da8`](https://github.com/tobymao/sqlglot/commit/87b1da8f32bbdf6e5c8d5b6b3bdf454e42835740) - json extract with : roundtrip *(PR [#7750](https://github.com/tobymao/sqlglot/pull/7750) by [@geooo109](https://github.com/geooo109))*:
|
|
15
|
+
|
|
16
|
+
json extract with : roundtrip (#7750)
|
|
17
|
+
|
|
18
|
+
- due to [`dbc83df`](https://github.com/tobymao/sqlglot/commit/dbc83df5ed89be8576e6b93a34312b73b0673c43) - JSON path key quote granularity *(PR [#7758](https://github.com/tobymao/sqlglot/pull/7758) by [@geooo109](https://github.com/geooo109))*:
|
|
19
|
+
|
|
20
|
+
JSON path key quote granularity (#7758)
|
|
21
|
+
|
|
22
|
+
- due to [`5ad2add`](https://github.com/tobymao/sqlglot/commit/5ad2addd1ca4cd057c297519a5e5f5fe9c17131d) - preserve line breaks between consecutive comments in pretty mode *(PR [#7770](https://github.com/tobymao/sqlglot/pull/7770) by [@tobymao](https://github.com/tobymao))*:
|
|
23
|
+
|
|
24
|
+
preserve line breaks between consecutive comments in pretty mode (#7770)
|
|
25
|
+
|
|
26
|
+
- due to [`719a34c`](https://github.com/tobymao/sqlglot/commit/719a34cea6f90dae270d1f28c526ad1c0bd72354) - annotate replace for mysql *(PR [#7774](https://github.com/tobymao/sqlglot/pull/7774) by [@PiyaDaswadkar](https://github.com/PiyaDaswadkar))*:
|
|
27
|
+
|
|
28
|
+
annotate replace for mysql (#7774)
|
|
29
|
+
|
|
30
|
+
- due to [`4d621b2`](https://github.com/tobymao/sqlglot/commit/4d621b2d7e3c27bc95136fa6d7d0d54f96e9ff94) - Annotate Typeof for Spark/DBX *(PR [#7772](https://github.com/tobymao/sqlglot/pull/7772) by [@Anuja006](https://github.com/Anuja006))*:
|
|
31
|
+
|
|
32
|
+
Annotate Typeof for Spark/DBX (#7772)
|
|
33
|
+
|
|
34
|
+
- due to [`0971a28`](https://github.com/tobymao/sqlglot/commit/0971a287e86c46183a39f8af9b6821daa482c441) - annotate `TYPEOF` as string globally *(PR [#7781](https://github.com/tobymao/sqlglot/pull/7781) by [@georgesittas](https://github.com/georgesittas))*:
|
|
35
|
+
|
|
36
|
+
annotate `TYPEOF` as string globally (#7781)
|
|
37
|
+
|
|
38
|
+
- due to [`91a781b`](https://github.com/tobymao/sqlglot/commit/91a781b9cbe5fb1a3f401464b6ef76aab0715188) - coerce bigquery date function arg types [CLAUDE] *(PR [#7790](https://github.com/tobymao/sqlglot/pull/7790) by [@etonlels](https://github.com/etonlels))*:
|
|
39
|
+
|
|
40
|
+
coerce bigquery date function arg types [CLAUDE] (#7790)
|
|
41
|
+
|
|
42
|
+
- due to [`075eaf5`](https://github.com/tobymao/sqlglot/commit/075eaf5d8a67e24f85d282f5b8f9ba912f21025f) - annotate DIV for Hive/Spark/DBX *(PR [#7788](https://github.com/tobymao/sqlglot/pull/7788) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
|
|
43
|
+
|
|
44
|
+
annotate DIV for Hive/Spark/DBX (#7788)
|
|
45
|
+
|
|
46
|
+
- due to [`b1a0070`](https://github.com/tobymao/sqlglot/commit/b1a0070ca9989e76e30ab512f206423d5d6de0bc) - resolve lateral subquery columns *(PR [#7802](https://github.com/tobymao/sqlglot/pull/7802) by [@georgesittas](https://github.com/georgesittas))*:
|
|
47
|
+
|
|
48
|
+
resolve lateral subquery columns (#7802)
|
|
49
|
+
|
|
50
|
+
- due to [`64e268a`](https://github.com/tobymao/sqlglot/commit/64e268a5d95cd84a87ad74ef569fc9bf356fd3fb) - support arrayMap and arrayFilter roundtrips [CODEX] *(PR [#7794](https://github.com/tobymao/sqlglot/pull/7794) by [@gaoflow](https://github.com/gaoflow))*:
|
|
51
|
+
|
|
52
|
+
support arrayMap and arrayFilter roundtrips [CODEX] (#7794)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### :sparkles: New Features
|
|
56
|
+
- [`a288150`](https://github.com/tobymao/sqlglot/commit/a288150655bb9ba612a299937bf451143b9869b4) - **duckdb**: Add transpilation support for TRY_CAST INTERVAL *(PR [#7731](https://github.com/tobymao/sqlglot/pull/7731) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
57
|
+
- [`d0ebc83`](https://github.com/tobymao/sqlglot/commit/d0ebc8353a3be4eb3258a9e078cc5e124c0e8c78) - **optimizer**: Annotate MINUTE function *(PR [#7747](https://github.com/tobymao/sqlglot/pull/7747) by [@vishvambhar-ranoshe](https://github.com/vishvambhar-ranoshe))*
|
|
58
|
+
- [`2e7f8b7`](https://github.com/tobymao/sqlglot/commit/2e7f8b7e6eea5301a902bacf09e00f853e6c77b5) - **snowflake**: add UNDROP support for all Snowflake Time Travel object types *(PR [#7735](https://github.com/tobymao/sqlglot/pull/7735) by [@Danielhaiman](https://github.com/Danielhaiman))*
|
|
59
|
+
- :arrow_lower_right: *addresses issue [#7734](https://github.com/tobymao/sqlglot/issues/7734) opened by [@Danielhaiman](https://github.com/Danielhaiman)*
|
|
60
|
+
- [`4804de4`](https://github.com/tobymao/sqlglot/commit/4804de4087caa73016a07daa2c2de6965c83f872) - **snowflake**: support `RENAME TO` clause in `UNDROP` statement *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
61
|
+
- [`72e6796`](https://github.com/tobymao/sqlglot/commit/72e6796bb8d7bdb6229ec2d1f352ba4d96ff3c71) - **duckdb**: Fix and updates tests for pivot subquery string lietral column names *(PR [#7757](https://github.com/tobymao/sqlglot/pull/7757) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
62
|
+
- [`78c5cf9`](https://github.com/tobymao/sqlglot/commit/78c5cf92f262b0743470d91b3a24c0bb462a4183) - **snowflake**: transpile Snowflake IDENTIFIER function to DuckDB *(PR [#7723](https://github.com/tobymao/sqlglot/pull/7723) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
63
|
+
- [`12eba76`](https://github.com/tobymao/sqlglot/commit/12eba761aa5839d1bfeb454abfacf9130723dae7) - **duckdb**: Add transpilation support for Snowflake STARTS WITH ... CONNECT BY *(PR [#7709](https://github.com/tobymao/sqlglot/pull/7709) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
64
|
+
- [`5ad2add`](https://github.com/tobymao/sqlglot/commit/5ad2addd1ca4cd057c297519a5e5f5fe9c17131d) - preserve line breaks between consecutive comments in pretty mode *(PR [#7770](https://github.com/tobymao/sqlglot/pull/7770) by [@tobymao](https://github.com/tobymao))*
|
|
65
|
+
- :arrow_lower_right: *addresses issue [#7764](https://github.com/tobymao/sqlglot/issues/7764) opened by [@betodealmeida](https://github.com/betodealmeida)*
|
|
66
|
+
- [`719a34c`](https://github.com/tobymao/sqlglot/commit/719a34cea6f90dae270d1f28c526ad1c0bd72354) - **optimizer**: annotate replace for mysql *(PR [#7774](https://github.com/tobymao/sqlglot/pull/7774) by [@PiyaDaswadkar](https://github.com/PiyaDaswadkar))*
|
|
67
|
+
- [`d4c74a2`](https://github.com/tobymao/sqlglot/commit/d4c74a2b62c64589a0b1261bbf623ca89da8c687) - **bigquery**: reject connected adjacent string literals closes [#7780](https://github.com/tobymao/sqlglot/pull/7780) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
68
|
+
- [`4d621b2`](https://github.com/tobymao/sqlglot/commit/4d621b2d7e3c27bc95136fa6d7d0d54f96e9ff94) - **optimizer**: Annotate Typeof for Spark/DBX *(PR [#7772](https://github.com/tobymao/sqlglot/pull/7772) by [@Anuja006](https://github.com/Anuja006))*
|
|
69
|
+
- [`eaa3f98`](https://github.com/tobymao/sqlglot/commit/eaa3f982d435d3d0aea27019be5d1a4a9fd47fa2) - **optimizer**: move typeof annotator to hive instead of spark *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
70
|
+
- [`0971a28`](https://github.com/tobymao/sqlglot/commit/0971a287e86c46183a39f8af9b6821daa482c441) - **optimizer**: annotate `TYPEOF` as string globally *(PR [#7781](https://github.com/tobymao/sqlglot/pull/7781) by [@georgesittas](https://github.com/georgesittas))*
|
|
71
|
+
- [`2ecdfe5`](https://github.com/tobymao/sqlglot/commit/2ecdfe5cf9e0817bb2be9b2d83895e298dfbfe8a) - **duckdb**: transpile CONNECT_BY_ROOT *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
72
|
+
- [`6dbcf81`](https://github.com/tobymao/sqlglot/commit/6dbcf818b4cc938786c0d79f446ef9e9543f5e0e) - **optimizer**: Annotate types tests for spark2, spark, databricks ABS function *(PR [#7789](https://github.com/tobymao/sqlglot/pull/7789) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
73
|
+
- [`9f18b77`](https://github.com/tobymao/sqlglot/commit/9f18b7705833c54478ce990c3319d2153ecb8be9) - **parser**: support `CALLED ON NULL INPUT` function property *(PR [#7792](https://github.com/tobymao/sqlglot/pull/7792) by [@eruditmorina](https://github.com/eruditmorina))*
|
|
74
|
+
- :arrow_lower_right: *addresses issue [#4916](https://github.com/tobymao/sqlglot/issues/4916) opened by [@florian-ernst-alan](https://github.com/florian-ernst-alan)*
|
|
75
|
+
- [`523f7c2`](https://github.com/tobymao/sqlglot/commit/523f7c2551906ffc37a03b8dae0fea3a0fca783d) - **snowflake**: support properties before column definitions in `CREATE` statements *(PR [#7787](https://github.com/tobymao/sqlglot/pull/7787) by [@eruditmorina](https://github.com/eruditmorina))*
|
|
76
|
+
- [`075eaf5`](https://github.com/tobymao/sqlglot/commit/075eaf5d8a67e24f85d282f5b8f9ba912f21025f) - **optimizer**: annotate DIV for Hive/Spark/DBX *(PR [#7788](https://github.com/tobymao/sqlglot/pull/7788) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
|
|
77
|
+
- [`7a0a9ab`](https://github.com/tobymao/sqlglot/commit/7a0a9abc516fd3280382f26b89adfc1547c10098) - **snowflake**: support invoking dynamically-resolved functions via `IDENTIFIER()` *(PR [#7796](https://github.com/tobymao/sqlglot/pull/7796) by [@eruditmorina](https://github.com/eruditmorina))*
|
|
78
|
+
|
|
79
|
+
### :bug: Bug Fixes
|
|
80
|
+
- [`8889df9`](https://github.com/tobymao/sqlglot/commit/8889df9017160f3e72af562f5387cca9b4e6606e) - **transpile-bug**: update core, generator, optimizer, and parser files for select-star-ilike-rename *(PR [#7720](https://github.com/tobymao/sqlglot/pull/7720) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
81
|
+
- [`bd7a989`](https://github.com/tobymao/sqlglot/commit/bd7a9895e47781f3c7d0a66cd89bf1568f313a83) - **parser**: add single quotes escape for hive hierarchy *(PR [#7741](https://github.com/tobymao/sqlglot/pull/7741) by [@cchambers-rdi](https://github.com/cchambers-rdi))*
|
|
82
|
+
- [`56390d6`](https://github.com/tobymao/sqlglot/commit/56390d682ca7db5f0c6003fc15187385bea9c9b9) - **parser**: revert single quote escape for hive hierarchy *(commit by [@geooo109](https://github.com/geooo109))*
|
|
83
|
+
- [`27aee3e`](https://github.com/tobymao/sqlglot/commit/27aee3e66434fe50c744cfbb7bd344bfe8d69a5b) - **duckdb**: add ParseDatetime transpilation for BigQuery to DuckDB *(PR [#7704](https://github.com/tobymao/sqlglot/pull/7704) by [@william-goode](https://github.com/william-goode))*
|
|
84
|
+
- [`9bebfd2`](https://github.com/tobymao/sqlglot/commit/9bebfd283cb766eb5f3f2b8ccfd0ad345681f9c8) - **optimizer**: unwrap parens less aggressively in `qualify_tables` *(PR [#7742](https://github.com/tobymao/sqlglot/pull/7742) by [@georgesittas](https://github.com/georgesittas))*
|
|
85
|
+
- [`4c2cd15`](https://github.com/tobymao/sqlglot/commit/4c2cd15c7a66bb240a8508517bb492aa7ed6c84a) - **clickhouse**: `SETTINGS` cannot act as an alias token closes [#7749](https://github.com/tobymao/sqlglot/pull/7749) *(commit by [@georgesittas](https://github.com/georgesittas))*
|
|
86
|
+
- [`87b1da8`](https://github.com/tobymao/sqlglot/commit/87b1da8f32bbdf6e5c8d5b6b3bdf454e42835740) - **databricks**: json extract with : roundtrip *(PR [#7750](https://github.com/tobymao/sqlglot/pull/7750) by [@geooo109](https://github.com/geooo109))*
|
|
87
|
+
- [`da26192`](https://github.com/tobymao/sqlglot/commit/da261928a85d2996f77965450c710cc024505d68) - `_KEYWORD_TRIE` type annotation: keys are `str | int` *(PR [#7753](https://github.com/tobymao/sqlglot/pull/7753) by [@tobymao](https://github.com/tobymao))*
|
|
88
|
+
- [`8375e06`](https://github.com/tobymao/sqlglot/commit/8375e0674fc355448877c302a7e8d96eb3d27536) - **bigquery**: extend PROJECTION_ALIASES_SHADOW_SOURCE_NAMES to QUALIFY clause *(commit by [@tobymao](https://github.com/tobymao))*
|
|
89
|
+
- [`4ada15a`](https://github.com/tobymao/sqlglot/commit/4ada15a4291c110a6bd7c42cfa298fff0cfd4c6d) - **parser**: more robust ON CONFLICT *(PR [#7760](https://github.com/tobymao/sqlglot/pull/7760) by [@geooo109](https://github.com/geooo109))*
|
|
90
|
+
- :arrow_lower_right: *fixes issue [#7759](https://github.com/tobymao/sqlglot/issues/7759) opened by [@SherAndrei](https://github.com/SherAndrei)*
|
|
91
|
+
- [`dbc83df`](https://github.com/tobymao/sqlglot/commit/dbc83df5ed89be8576e6b93a34312b73b0673c43) - **parser**: JSON path key quote granularity *(PR [#7758](https://github.com/tobymao/sqlglot/pull/7758) by [@geooo109](https://github.com/geooo109))*
|
|
92
|
+
- [`02e2469`](https://github.com/tobymao/sqlglot/commit/02e24696524013da632cfd2e35f83da28b5e2947) - **postgres**: support jsonpath @? operator CODEX *(PR [#7766](https://github.com/tobymao/sqlglot/pull/7766) by [@fpatz](https://github.com/fpatz))*
|
|
93
|
+
- [`82f700e`](https://github.com/tobymao/sqlglot/commit/82f700e2aa8c7d9281063b889129e555f23b786d) - **postgres**: preserve ARRAY roundtrip for SET OPS *(PR [#7765](https://github.com/tobymao/sqlglot/pull/7765) by [@geooo109](https://github.com/geooo109))*
|
|
94
|
+
- [`bc71151`](https://github.com/tobymao/sqlglot/commit/bc7115100ec3e1a839b2a8a08813c4606826399a) - **postgres**: 1 arg UUID roundtrip *(PR [#7767](https://github.com/tobymao/sqlglot/pull/7767) by [@geooo109](https://github.com/geooo109))*
|
|
95
|
+
- [`31cee10`](https://github.com/tobymao/sqlglot/commit/31cee10b187359597aef88976d46233d25642d02) - **druid**: add JSON_VALUE RETURNING support *(PR [#7771](https://github.com/tobymao/sqlglot/pull/7771) by [@sitelight](https://github.com/sitelight))*
|
|
96
|
+
- [`499d132`](https://github.com/tobymao/sqlglot/commit/499d1321d85d99b09f62ec97a0730c61b5464e6b) - **postgres**: preserve contained-by operator direction CODEX *(PR [#7768](https://github.com/tobymao/sqlglot/pull/7768) by [@fpatz](https://github.com/fpatz))*
|
|
97
|
+
- [`7db4d25`](https://github.com/tobymao/sqlglot/commit/7db4d2515435ba3d0651f2bd467fca1a747be265) - **snowflake**: transpile FROM_ISO8601_TIMESTAMP to cast [CLAUDE] *(PR [#7776](https://github.com/tobymao/sqlglot/pull/7776) by [@baruchoxman](https://github.com/baruchoxman))*
|
|
98
|
+
- :arrow_lower_right: *fixes issue [#7775](https://github.com/tobymao/sqlglot/issues/7775) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
99
|
+
- [`43a3d9f`](https://github.com/tobymao/sqlglot/commit/43a3d9fc9503e667d1979dba6131feb8851a588b) - **presto**: transpile FROM_ISO8601_DATE to cast [CLAUDE] *(PR [#7778](https://github.com/tobymao/sqlglot/pull/7778) by [@baruchoxman](https://github.com/baruchoxman))*
|
|
100
|
+
- :arrow_lower_right: *fixes issue [#7777](https://github.com/tobymao/sqlglot/issues/7777) opened by [@baruchoxman](https://github.com/baruchoxman)*
|
|
101
|
+
- [`2637c56`](https://github.com/tobymao/sqlglot/commit/2637c5696e4ce34d54600154376f400ba06d1860) - **snowflake**: preserve PATTERN clause on staged files without FILE_FORMAT *(PR [#7783](https://github.com/tobymao/sqlglot/pull/7783) by [@eruditmorina](https://github.com/eruditmorina))*
|
|
102
|
+
- :arrow_lower_right: *fixes issue [#7782](https://github.com/tobymao/sqlglot/issues/7782) opened by [@eruditmorina](https://github.com/eruditmorina)*
|
|
103
|
+
- [`9222960`](https://github.com/tobymao/sqlglot/commit/9222960cb1dfca49c4b18eb139d5a2c843f133a6) - **duckdb**: Fix lexical backslash handling *(PR [#7769](https://github.com/tobymao/sqlglot/pull/7769) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
104
|
+
- [`9385433`](https://github.com/tobymao/sqlglot/commit/9385433d96765650246d9d851d4f6197e8c958c7) - **optimizer**: stacked decorators bug *(PR [#7784](https://github.com/tobymao/sqlglot/pull/7784) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
105
|
+
- [`6de030d`](https://github.com/tobymao/sqlglot/commit/6de030d5f39ecc16911fbca9a41ac029e9541d21) - **optimizer**: add timestamp sub-day unit support *(PR [#7785](https://github.com/tobymao/sqlglot/pull/7785) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
|
|
106
|
+
- [`52fe296`](https://github.com/tobymao/sqlglot/commit/52fe2966081d430ab22d4eaf52f6d9c8cdb21248) - **exasol**: robust LISTAGG support CLAUDE *(PR [#7786](https://github.com/tobymao/sqlglot/pull/7786) by [@gaoflow](https://github.com/gaoflow))*
|
|
107
|
+
- [`e16a179`](https://github.com/tobymao/sqlglot/commit/e16a179a4226e7049e050f5cc86d63ace9c60b40) - **optimizer**: handle non-commutative subtraction in simplify_equality *(PR [#7791](https://github.com/tobymao/sqlglot/pull/7791) by [@code-alexander](https://github.com/code-alexander))*
|
|
108
|
+
- [`91a781b`](https://github.com/tobymao/sqlglot/commit/91a781b9cbe5fb1a3f401464b6ef76aab0715188) - **annotate_types**: coerce bigquery date function arg types [CLAUDE] *(PR [#7790](https://github.com/tobymao/sqlglot/pull/7790) by [@etonlels](https://github.com/etonlels))*
|
|
109
|
+
- [`b1a0070`](https://github.com/tobymao/sqlglot/commit/b1a0070ca9989e76e30ab512f206423d5d6de0bc) - **optimizer**: resolve lateral subquery columns *(PR [#7802](https://github.com/tobymao/sqlglot/pull/7802) by [@georgesittas](https://github.com/georgesittas))*
|
|
110
|
+
- :arrow_lower_right: *fixes issue [#7799](https://github.com/tobymao/sqlglot/issues/7799) opened by [@EhabEasee](https://github.com/EhabEasee)*
|
|
111
|
+
- [`64e268a`](https://github.com/tobymao/sqlglot/commit/64e268a5d95cd84a87ad74ef569fc9bf356fd3fb) - **clickhouse**: support arrayMap and arrayFilter roundtrips [CODEX] *(PR [#7794](https://github.com/tobymao/sqlglot/pull/7794) by [@gaoflow](https://github.com/gaoflow))*
|
|
112
|
+
|
|
113
|
+
### :wrench: Chores
|
|
114
|
+
- [`6f4a990`](https://github.com/tobymao/sqlglot/commit/6f4a990356a49f27d4b056ed9a86d69a22206ab4) - **parser**: PARSE_DATETIME uses year as default *(PR [#7743](https://github.com/tobymao/sqlglot/pull/7743) by [@geooo109](https://github.com/geooo109))*
|
|
115
|
+
- [`62a0ba5`](https://github.com/tobymao/sqlglot/commit/62a0ba5bec243be6f1988261a0835cff60c4acfe) - **duckdb**: Add transpilation tests for ilike-replace *(PR [#7744](https://github.com/tobymao/sqlglot/pull/7744) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
|
|
116
|
+
- [`6f99d4e`](https://github.com/tobymao/sqlglot/commit/6f99d4e06d09e576f32f4243caabcbcb44c33a38) - fix makefile to install integration tests *(commit by [@tobymao](https://github.com/tobymao))*
|
|
117
|
+
- [`07fe98b`](https://github.com/tobymao/sqlglot/commit/07fe98bc446b4acde121ae88260294e89e469583) - LISTAGG refactor for exasol *(commit by [@geooo109](https://github.com/geooo109))*
|
|
118
|
+
|
|
119
|
+
|
|
4
120
|
## [v30.11.0] - 2026-06-11
|
|
5
121
|
### :boom: BREAKING CHANGES
|
|
6
122
|
- due to [`df507aa`](https://github.com/tobymao/sqlglot/commit/df507aac2887d79e229cbc6003ed206e8528449c) - GET_JSON_OBJECT roundtrip *(PR [#7728](https://github.com/tobymao/sqlglot/pull/7728) by [@geooo109](https://github.com/geooo109))*:
|
|
@@ -14639,3 +14755,4 @@ pip install "sqlglot[c]" # compiled — faster, but no subclassing
|
|
|
14639
14755
|
[v30.9.0]: https://github.com/tobymao/sqlglot/compare/v30.8.0...v30.9.0
|
|
14640
14756
|
[v30.10.0]: https://github.com/tobymao/sqlglot/compare/v30.9.0...v30.10.0
|
|
14641
14757
|
[v30.11.0]: https://github.com/tobymao/sqlglot/compare/v30.10.0...v30.11.0
|
|
14758
|
+
[v30.12.0]: https://github.com/tobymao/sqlglot/compare/v30.11.0...v30.12.0
|
|
@@ -45,6 +45,32 @@ Note: make sure to follow the [Conventional Commits](https://www.conventionalcom
|
|
|
45
45
|
|
|
46
46
|
Each pull request should focus on a single, well-defined change. Avoid bundling multiple unrelated fixes or features in one PR. This makes code review faster and more effective, increases the likelihood of acceptance, and helps maintain a clean git history.
|
|
47
47
|
|
|
48
|
+
## LLM-assisted contributions
|
|
49
|
+
|
|
50
|
+
Like many open source projects, SQLGlot has recently seen a surge of pull requests that are largely
|
|
51
|
+
generated by LLMs (ChatGPT, Claude, Cursor, Copilot, etc.) with little human review. These tools can
|
|
52
|
+
be useful, but low-effort, AI-generated PRs can create problems for the project:
|
|
53
|
+
|
|
54
|
+
- Descriptions are often padded with boilerplate AI slop that obscures what actually changed and why.
|
|
55
|
+
- The code frequently misses subtle nuances and edge cases that the author never took the time to understand.
|
|
56
|
+
- Reviewing them carefully consumes a disproportionate amount of maintainer time, often more than it
|
|
57
|
+
would take a maintainer to implement the change correctly from scratch.
|
|
58
|
+
|
|
59
|
+
Our policy:
|
|
60
|
+
|
|
61
|
+
- **You are fully responsible for every line you submit.** "An LLM wrote it" is not an acceptable answer
|
|
62
|
+
to a review question. If you cannot explain why a change is correct, do not open the PR.
|
|
63
|
+
- **Disclose LLM use.** Human contributors who used an LLM are encouraged to mention it in a disclaimer.
|
|
64
|
+
- **Write the PR description yourself.** Keep it concise and human-written; a few clear sentences without
|
|
65
|
+
emojis summaries and restatements of the diff are worth more than a wall of text.
|
|
66
|
+
- **If you are a new contributor, prefer opening an issue over a PR.** We are interested in growing
|
|
67
|
+
long-term contributors who genuinely understand the codebase. If you have found a bug or have a fix in
|
|
68
|
+
mind, open a well-written issue with a reproducible example (see below). The core team can usually
|
|
69
|
+
address it faster and more accurately than it takes to review an AI-generated PR.
|
|
70
|
+
- **Low-effort PRs that are mostly LLM-generated with little human input will be closed** without a
|
|
71
|
+
detailed review, with a pointer to this policy. This is not a judgment of you as a contributor, it is
|
|
72
|
+
simply how we keep review bandwidth focused on changes that move the project forward.
|
|
73
|
+
|
|
48
74
|
## Report bugs using GitHub's [issues](https://github.com/tobymao/sqlglot/issues)
|
|
49
75
|
|
|
50
76
|
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlglot
|
|
3
|
-
Version: 30.
|
|
3
|
+
Version: 30.13.0
|
|
4
4
|
Summary: An easily customizable SQL parser and transpiler
|
|
5
5
|
Author-email: Toby Mao <toby.mao@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: duckdb>=0.6; extra == "dev"
|
|
22
|
-
Requires-Dist: sqlglot-mypy>=2.1.0.
|
|
22
|
+
Requires-Dist: sqlglot-mypy>=2.1.0.post9; python_version >= "3.10" and extra == "dev"
|
|
23
23
|
Requires-Dist: mypy; python_version < "3.10" and extra == "dev"
|
|
24
24
|
Requires-Dist: setuptools_scm; extra == "dev"
|
|
25
25
|
Requires-Dist: pandas; extra == "dev"
|
|
@@ -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.13.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.13.0; python_version >= "3.10" and extra == "rs"
|
|
41
41
|
Dynamic: license-file
|
|
42
42
|
Dynamic: provides-extra
|
|
43
43
|
|
|
@@ -629,6 +629,7 @@ x + interval '1' month
|
|
|
629
629
|
| BigQuery | Official |
|
|
630
630
|
| ClickHouse | Official |
|
|
631
631
|
| Databricks | Official |
|
|
632
|
+
| DAX | Community |
|
|
632
633
|
| Doris | Community |
|
|
633
634
|
| Dremio | Community |
|
|
634
635
|
| Drill | Community |
|
|
@@ -9,7 +9,7 @@ setup(
|
|
|
9
9
|
"duckdb>=0.6",
|
|
10
10
|
# sqlglot-mypy 1.20+ is the build dep for sqlglotc and only ships
|
|
11
11
|
# for py3.10+; on py3.9 just use upstream mypy for type checking.
|
|
12
|
-
"sqlglot-mypy >= 2.1.0.
|
|
12
|
+
"sqlglot-mypy >= 2.1.0.post9; python_version >= '3.10'",
|
|
13
13
|
"mypy; python_version < '3.10'",
|
|
14
14
|
"setuptools_scm",
|
|
15
15
|
"pandas",
|
|
@@ -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.13.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (30, 13, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g98e2b3fa9'
|
|
@@ -108,6 +108,7 @@ class ClickHouse(Dialect):
|
|
|
108
108
|
"IPV4": TokenType.IPV4,
|
|
109
109
|
"IPV6": TokenType.IPV6,
|
|
110
110
|
"POINT": TokenType.POINT,
|
|
111
|
+
"PROJECTION": TokenType.PROJECTION,
|
|
111
112
|
"RING": TokenType.RING,
|
|
112
113
|
"LINESTRING": TokenType.LINESTRING,
|
|
113
114
|
"MULTILINESTRING": TokenType.MULTILINESTRING,
|
|
@@ -9,11 +9,13 @@ from sqlglot.generators.databricks import DatabricksGenerator
|
|
|
9
9
|
from sqlglot.parsers.databricks import DatabricksParser
|
|
10
10
|
from sqlglot.tokens import TokenType
|
|
11
11
|
from sqlglot.optimizer.annotate_types import TypeAnnotator
|
|
12
|
+
from sqlglot.typing.databricks import EXPRESSION_METADATA
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class Databricks(Spark):
|
|
15
16
|
SAFE_DIVISION = False
|
|
16
17
|
COPY_PARAMS_ARE_CSV = False
|
|
18
|
+
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
17
19
|
|
|
18
20
|
COERCES_TO = defaultdict(set, deepcopy(TypeAnnotator.COERCES_TO))
|
|
19
21
|
for text_type in exp.DataType.TEXT_TYPES:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from sqlglot import tokens
|
|
4
|
+
from sqlglot.dialects.dialect import Dialect
|
|
5
|
+
from sqlglot.generators.dax import DAXGenerator
|
|
6
|
+
from sqlglot.parsers.dax import DAXParser
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DAX(Dialect):
|
|
10
|
+
DPIPE_IS_STRING_CONCAT = False
|
|
11
|
+
|
|
12
|
+
Generator = DAXGenerator
|
|
13
|
+
|
|
14
|
+
class Tokenizer(tokens.Tokenizer):
|
|
15
|
+
IDENTIFIERS = ["'", ("[", "]")]
|
|
16
|
+
QUOTES = ['"']
|
|
17
|
+
STRING_ESCAPES = ['"']
|
|
18
|
+
COMMENTS = ["--", "//", ("/*", "*/")]
|
|
19
|
+
|
|
20
|
+
Parser = DAXParser
|
|
@@ -86,6 +86,7 @@ class Dialects(str, Enum):
|
|
|
86
86
|
BIGQUERY = "bigquery"
|
|
87
87
|
CLICKHOUSE = "clickhouse"
|
|
88
88
|
DATABRICKS = "databricks"
|
|
89
|
+
DAX = "dax"
|
|
89
90
|
DORIS = "doris"
|
|
90
91
|
DREMIO = "dremio"
|
|
91
92
|
DRILL = "drill"
|
|
@@ -134,6 +135,23 @@ class NormalizationStrategy(str, AutoName):
|
|
|
134
135
|
"""Always case-insensitive (uppercase), regardless of quotes."""
|
|
135
136
|
|
|
136
137
|
|
|
138
|
+
# "Strict" dialects (e.g. modern Hive, Spark 3+) map their zero-padded MM/dd to these in TIME_MAPPING so they
|
|
139
|
+
# roundtrip, since a lax %m/%d renders non-padded there for parse expressions (see HiveGenerator.format_time).
|
|
140
|
+
STRICT_TIME_FORMATS = {"%mstrict": "%m", "%dstrict": "%d"}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _with_strict_time_inverse(inverse_mapping: dict[str, str]) -> dict[str, str]:
|
|
144
|
+
for strict_format, lax_format in STRICT_TIME_FORMATS.items():
|
|
145
|
+
if strict_format in inverse_mapping:
|
|
146
|
+
# In strict dialects, a foreign lax %m formats the same padded way as %mstrict (MM)
|
|
147
|
+
inverse_mapping.setdefault(lax_format, inverse_mapping[strict_format])
|
|
148
|
+
else:
|
|
149
|
+
# Elsewhere, the strict format degrades to its lax counterpart so it never leaks
|
|
150
|
+
inverse_mapping.setdefault(strict_format, inverse_mapping.get(lax_format, lax_format))
|
|
151
|
+
|
|
152
|
+
return inverse_mapping
|
|
153
|
+
|
|
154
|
+
|
|
137
155
|
class _Dialect(type):
|
|
138
156
|
_classes: dict[str, Type[Dialect]] = {}
|
|
139
157
|
|
|
@@ -237,11 +255,14 @@ class _Dialect(type):
|
|
|
237
255
|
)
|
|
238
256
|
# Merge class-defined INVERSE_TIME_MAPPING with auto-generated mappings
|
|
239
257
|
# This allows dialects to define custom inverse mappings for roundtrip correctness
|
|
240
|
-
klass.INVERSE_TIME_MAPPING =
|
|
241
|
-
klass.
|
|
258
|
+
klass.INVERSE_TIME_MAPPING = _with_strict_time_inverse(
|
|
259
|
+
{v: k for k, v in klass.TIME_MAPPING.items()}
|
|
260
|
+
| (klass.__dict__.get("INVERSE_TIME_MAPPING") or {})
|
|
242
261
|
)
|
|
243
262
|
klass.INVERSE_TIME_TRIE = new_trie(klass.INVERSE_TIME_MAPPING)
|
|
244
|
-
klass.INVERSE_FORMAT_MAPPING =
|
|
263
|
+
klass.INVERSE_FORMAT_MAPPING = _with_strict_time_inverse(
|
|
264
|
+
{v: k for k, v in klass.FORMAT_MAPPING.items()}
|
|
265
|
+
)
|
|
245
266
|
klass.INVERSE_FORMAT_TRIE = new_trie(klass.INVERSE_FORMAT_MAPPING)
|
|
246
267
|
|
|
247
268
|
klass.INVERSE_CREATABLE_KIND_MAPPING = {
|
|
@@ -1797,10 +1818,6 @@ def trim_sql(self: Generator, expression: exp.Trim, default_trim_type: str = "")
|
|
|
1797
1818
|
return f"TRIM({trim_type}{remove_chars}{from_part}{target}{collation})"
|
|
1798
1819
|
|
|
1799
1820
|
|
|
1800
|
-
def str_to_time_sql(self: Generator, expression: exp.Expr) -> str:
|
|
1801
|
-
return self.func("STRPTIME", expression.this, self.format_time(expression))
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
1821
|
def concat_to_dpipe_sql(self: Generator, expression: exp.Concat) -> str:
|
|
1805
1822
|
return self.sql(reduce(lambda x, y: exp.DPipe(this=x, expression=y), expression.expressions))
|
|
1806
1823
|
|
|
@@ -2024,6 +2041,45 @@ def unit_to_var(expression: exp.Expr, default: str = "DAY") -> exp.Expr | None:
|
|
|
2024
2041
|
return exp.Var(this=value) if value else None
|
|
2025
2042
|
|
|
2026
2043
|
|
|
2044
|
+
# Days of week to ISO 8601 day-of-week numbers
|
|
2045
|
+
# ISO 8601 standard: Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6, Sunday=7
|
|
2046
|
+
WEEK_START_DAY_TO_DOW = {
|
|
2047
|
+
"MONDAY": 1,
|
|
2048
|
+
"TUESDAY": 2,
|
|
2049
|
+
"WEDNESDAY": 3,
|
|
2050
|
+
"THURSDAY": 4,
|
|
2051
|
+
"FRIDAY": 5,
|
|
2052
|
+
"SATURDAY": 6,
|
|
2053
|
+
"SUNDAY": 7,
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
def week_unit_to_dow(unit: exp.Expr | None) -> int | None:
|
|
2058
|
+
"""
|
|
2059
|
+
Compute the week start day for a week-ish diff unit, e.g BigQuery's WEEK(<day>)
|
|
2060
|
+
or ISOWEEK unit parts.
|
|
2061
|
+
|
|
2062
|
+
Args:
|
|
2063
|
+
unit: The unit expression (Var for WEEK/ISOWEEK or WeekStart)
|
|
2064
|
+
|
|
2065
|
+
Returns:
|
|
2066
|
+
The ISO 8601 day number (Monday=1, Sunday=7 etc) or None if not a week unit or if day is dynamic (not a constant).
|
|
2067
|
+
|
|
2068
|
+
Examples:
|
|
2069
|
+
"WEEK(SUNDAY)" -> 7
|
|
2070
|
+
"WEEK(MONDAY)" -> 1
|
|
2071
|
+
"ISOWEEK" -> 1
|
|
2072
|
+
"""
|
|
2073
|
+
if isinstance(unit, exp.Var) and unit.name.upper() in ("WEEK", "ISOWEEK"):
|
|
2074
|
+
return 1
|
|
2075
|
+
|
|
2076
|
+
# Handle WeekStart expressions with explicit day
|
|
2077
|
+
if isinstance(unit, exp.WeekStart):
|
|
2078
|
+
return WEEK_START_DAY_TO_DOW.get(unit.name.upper())
|
|
2079
|
+
|
|
2080
|
+
return None
|
|
2081
|
+
|
|
2082
|
+
|
|
2027
2083
|
@t.overload
|
|
2028
2084
|
def map_date_part(part: exp.Expr, dialect: DialectType = Dialect) -> exp.Expr:
|
|
2029
2085
|
pass
|
|
@@ -67,6 +67,12 @@ class Dremio(Dialect):
|
|
|
67
67
|
class Tokenizer(tokens.Tokenizer):
|
|
68
68
|
COMMENTS = ["--", "//", ("/*", "*/")]
|
|
69
69
|
|
|
70
|
+
KEYWORDS = {
|
|
71
|
+
**tokens.Tokenizer.KEYWORDS,
|
|
72
|
+
"AT SNAPSHOT": tokens.TokenType.VERSION_SNAPSHOT,
|
|
73
|
+
"AT TIMESTAMP": tokens.TokenType.TIMESTAMP_SNAPSHOT,
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
Parser = DremioParser
|
|
71
77
|
|
|
72
78
|
Generator = DremioGenerator
|
|
@@ -52,9 +52,10 @@ class Hive(Dialect):
|
|
|
52
52
|
"yy": "%y",
|
|
53
53
|
"MMMM": "%B",
|
|
54
54
|
"MMM": "%b",
|
|
55
|
-
|
|
55
|
+
# Hive 4.0+ parses MM/dd strictly (java.time.DateTimeFormatter, see HIVE-25458/HIVE-25576)
|
|
56
|
+
"MM": "%mstrict",
|
|
56
57
|
"M": "%-m",
|
|
57
|
-
"dd": "%
|
|
58
|
+
"dd": "%dstrict",
|
|
58
59
|
"d": "%-d",
|
|
59
60
|
"HH": "%H",
|
|
60
61
|
"H": "%-H",
|
|
@@ -51,12 +51,16 @@ class Postgres(Dialect):
|
|
|
51
51
|
"TMDy": "%a",
|
|
52
52
|
"TMMon": "%b", # Sep
|
|
53
53
|
"TMMonth": "%B", # September
|
|
54
|
+
"day": "%Aenlower", # tuesday
|
|
55
|
+
"dy": "%aenlower", # tue
|
|
54
56
|
"TZ": "%Z", # uppercase timezone name
|
|
55
57
|
"US": "%f", # zero padded microsecond
|
|
56
58
|
"ww": "%U", # 1-based week of year
|
|
57
59
|
"WW": "%U", # 1-based week of year
|
|
58
60
|
"yy": "%y", # 15
|
|
59
61
|
"YY": "%y", # 15
|
|
62
|
+
"yyy": "%Ythree", # 015
|
|
63
|
+
"YYY": "%Ythree", # 015
|
|
60
64
|
"yyyy": "%Y", # 2015
|
|
61
65
|
"YYYY": "%Y", # 2015
|
|
62
66
|
}
|
|
@@ -65,6 +69,7 @@ class Postgres(Dialect):
|
|
|
65
69
|
BIT_STRINGS = [("b'", "'"), ("B'", "'")]
|
|
66
70
|
HEX_STRINGS = [("x'", "'"), ("X'", "'")]
|
|
67
71
|
BYTE_STRINGS = [("e'", "'"), ("E'", "'")]
|
|
72
|
+
UNICODE_STRINGS = [("U&'", "'"), ("u&'", "'")]
|
|
68
73
|
BYTE_STRING_ESCAPES = ["'", "\\"]
|
|
69
74
|
HEREDOC_STRINGS = ["$"]
|
|
70
75
|
|
|
@@ -16,6 +16,9 @@ class Spark(Spark2):
|
|
|
16
16
|
ARRAY_FUNCS_PROPAGATES_NULLS = True
|
|
17
17
|
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
18
18
|
|
|
19
|
+
# Spark 3+ parses MM/dd strictly, unlike Spark 2 (SimpleDateFormat)
|
|
20
|
+
TIME_MAPPING = {**Spark2.TIME_MAPPING, "MM": "%mstrict", "dd": "%dstrict"}
|
|
21
|
+
|
|
19
22
|
class Tokenizer(Spark2.Tokenizer):
|
|
20
23
|
STRING_ESCAPES_ALLOWED_IN_RAW_STRINGS = False
|
|
21
24
|
|
|
@@ -12,6 +12,9 @@ class Spark2(Hive):
|
|
|
12
12
|
|
|
13
13
|
EXPRESSION_METADATA = EXPRESSION_METADATA.copy()
|
|
14
14
|
|
|
15
|
+
# Spark 2.x parses MM/dd leniently (SimpleDateFormat), unlike strict Hive/Spark 3+
|
|
16
|
+
TIME_MAPPING = {**Hive.TIME_MAPPING, "MM": "%m", "dd": "%d"}
|
|
17
|
+
|
|
15
18
|
# https://spark.apache.org/docs/latest/api/sql/index.html#initcap
|
|
16
19
|
# https://docs.databricks.com/aws/en/sql/language-manual/functions/initcap
|
|
17
20
|
# https://github.com/apache/spark/blob/master/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L859-L905
|
|
@@ -102,6 +102,7 @@ class Count(Expression, AggFunc):
|
|
|
102
102
|
|
|
103
103
|
class CountIf(Expression, AggFunc):
|
|
104
104
|
_sql_names = ["COUNT_IF", "COUNTIF"]
|
|
105
|
+
arg_types = {"this": True, "zero_on_all_null": False}
|
|
105
106
|
|
|
106
107
|
|
|
107
108
|
class CovarPop(Expression, AggFunc):
|
|
@@ -255,19 +256,19 @@ class RegrAvgy(Expression, AggFunc):
|
|
|
255
256
|
|
|
256
257
|
|
|
257
258
|
class RegrCount(Expression, AggFunc):
|
|
258
|
-
arg_types = {"this": True, "expression":
|
|
259
|
+
arg_types = {"this": True, "expression": False}
|
|
259
260
|
|
|
260
261
|
|
|
261
262
|
class RegrIntercept(Expression, AggFunc):
|
|
262
|
-
arg_types = {"this": True, "expression":
|
|
263
|
+
arg_types = {"this": True, "expression": False}
|
|
263
264
|
|
|
264
265
|
|
|
265
266
|
class RegrR2(Expression, AggFunc):
|
|
266
|
-
arg_types = {"this": True, "expression":
|
|
267
|
+
arg_types = {"this": True, "expression": False}
|
|
267
268
|
|
|
268
269
|
|
|
269
270
|
class RegrSlope(Expression, AggFunc):
|
|
270
|
-
arg_types = {"this": True, "expression":
|
|
271
|
+
arg_types = {"this": True, "expression": False}
|
|
271
272
|
|
|
272
273
|
|
|
273
274
|
class RegrSxx(Expression, AggFunc):
|
|
@@ -220,6 +220,11 @@ class PrimaryKey(Expression):
|
|
|
220
220
|
arg_types = {"this": False, "expressions": True, "options": False, "include": False}
|
|
221
221
|
|
|
222
222
|
|
|
223
|
+
# https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-table-constraint
|
|
224
|
+
class TimeseriesKey(Expression):
|
|
225
|
+
pass
|
|
226
|
+
|
|
227
|
+
|
|
223
228
|
class IndexParameters(Expression):
|
|
224
229
|
arg_types = {
|
|
225
230
|
"using": False,
|
|
@@ -477,6 +477,17 @@ class RegexpSplit(Expression, Func):
|
|
|
477
477
|
arg_types = {"this": True, "expression": True, "limit": False}
|
|
478
478
|
|
|
479
479
|
|
|
480
|
+
class RegexpSubstr(Expression, Func):
|
|
481
|
+
arg_types = {
|
|
482
|
+
"this": True,
|
|
483
|
+
"expression": True,
|
|
484
|
+
"position": False,
|
|
485
|
+
"occurrence": False,
|
|
486
|
+
"parameters": False,
|
|
487
|
+
"group": False,
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
|
|
480
491
|
# Hashing / cryptographic
|
|
481
492
|
|
|
482
493
|
|
|
@@ -106,7 +106,7 @@ class DatetimeAdd(Expression, Func, IntervalOp):
|
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
class DatetimeDiff(Expression, Func, TimeUnit):
|
|
109
|
-
arg_types = {"this": True, "expression": True, "unit": False}
|
|
109
|
+
arg_types = {"this": True, "expression": True, "unit": False, "date_part_boundary": False}
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
class DatetimeSub(Expression, Func, IntervalOp):
|
|
@@ -441,6 +441,10 @@ class FromISO8601Date(Expression, Func):
|
|
|
441
441
|
_sql_names = ["FROM_ISO8601_DATE"]
|
|
442
442
|
|
|
443
443
|
|
|
444
|
+
class FromISO8601TimestampNanos(Expression, Func):
|
|
445
|
+
_sql_names = ["FROM_ISO8601_TIMESTAMP_NANOS"]
|
|
446
|
+
|
|
447
|
+
|
|
444
448
|
class ParseDatetime(Expression, Func):
|
|
445
449
|
arg_types = {"this": True, "format": False, "zone": False, "default_year": False}
|
|
446
450
|
|
|
@@ -450,11 +454,18 @@ class ParseTime(Expression, Func):
|
|
|
450
454
|
|
|
451
455
|
|
|
452
456
|
class StrToDate(Expression, Func):
|
|
453
|
-
arg_types = {"this": True, "format": False, "safe": False}
|
|
457
|
+
arg_types = {"this": True, "format": False, "safe": False, "default_year": False}
|
|
454
458
|
|
|
455
459
|
|
|
456
460
|
class StrToTime(Expression, Func):
|
|
457
|
-
arg_types = {
|
|
461
|
+
arg_types = {
|
|
462
|
+
"this": True,
|
|
463
|
+
"format": True,
|
|
464
|
+
"zone": False,
|
|
465
|
+
"safe": False,
|
|
466
|
+
"target_type": False,
|
|
467
|
+
"default_year": False,
|
|
468
|
+
}
|
|
458
469
|
|
|
459
470
|
|
|
460
471
|
class StrToUnix(Expression, Func):
|