polyglot-sql 0.3.6__tar.gz → 0.3.9__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.
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/Cargo.lock +5 -5
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/Cargo.toml +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/PKG-INFO +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/Cargo.toml +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/builder.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/bigquery.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/clickhouse.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/databricks.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/duckdb.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/mod.rs +237 -3
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/snowflake.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/spark.rs +8 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/tsql.rs +6 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/expressions.rs +35 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/generator.rs +384 -134
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/lineage.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/canonicalize.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/subquery.rs +6 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/parser.rs +818 -203
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/scope.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/tokens.rs +39 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/transforms.rs +66 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/traversal.rs +6 -0
- polyglot_sql-0.3.9/crates/polyglot-sql/tests/clickhouse_regression.rs +159 -0
- polyglot_sql-0.3.9/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +168 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/deep_nesting_regression.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/fabric_regression.rs +36 -0
- polyglot_sql-0.3.9/crates/polyglot-sql/tests/fabric_tpch_regression.rs +580 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/transform_regression.rs +130 -2
- polyglot_sql-0.3.9/crates/polyglot-sql/tests/tsql_regression.rs +199 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/expr_types.rs +1 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_parse.py +19 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/python/polyglot_sql/__init__.py +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/python/polyglot_sql/__init__.pyi +11 -10
- polyglot_sql-0.3.6/crates/polyglot-sql/tests/clickhouse_regression.rs +0 -29
- polyglot_sql-0.3.6/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -95
- polyglot_sql-0.3.6/crates/polyglot-sql/tests/tsql_regression.rs +0 -85
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/error_handling.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/docs/index.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/pyproject.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.9}/python/polyglot_sql/py.typed +0 -0
|
@@ -605,7 +605,7 @@ dependencies = [
|
|
|
605
605
|
|
|
606
606
|
[[package]]
|
|
607
607
|
name = "polyglot-sql"
|
|
608
|
-
version = "0.3.
|
|
608
|
+
version = "0.3.9"
|
|
609
609
|
dependencies = [
|
|
610
610
|
"criterion",
|
|
611
611
|
"once_cell",
|
|
@@ -621,7 +621,7 @@ dependencies = [
|
|
|
621
621
|
|
|
622
622
|
[[package]]
|
|
623
623
|
name = "polyglot-sql-ffi"
|
|
624
|
-
version = "0.3.
|
|
624
|
+
version = "0.3.9"
|
|
625
625
|
dependencies = [
|
|
626
626
|
"cbindgen",
|
|
627
627
|
"polyglot-sql",
|
|
@@ -631,11 +631,11 @@ dependencies = [
|
|
|
631
631
|
|
|
632
632
|
[[package]]
|
|
633
633
|
name = "polyglot-sql-function-catalogs"
|
|
634
|
-
version = "0.3.
|
|
634
|
+
version = "0.3.9"
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
637
637
|
name = "polyglot-sql-python"
|
|
638
|
-
version = "0.3.
|
|
638
|
+
version = "0.3.9"
|
|
639
639
|
dependencies = [
|
|
640
640
|
"polyglot-sql",
|
|
641
641
|
"pyo3",
|
|
@@ -646,7 +646,7 @@ dependencies = [
|
|
|
646
646
|
|
|
647
647
|
[[package]]
|
|
648
648
|
name = "polyglot-sql-wasm"
|
|
649
|
-
version = "0.3.
|
|
649
|
+
version = "0.3.9"
|
|
650
650
|
dependencies = [
|
|
651
651
|
"console_error_panic_hook",
|
|
652
652
|
"js-sys",
|
|
@@ -83,7 +83,7 @@ thiserror = { workspace = true }
|
|
|
83
83
|
unicode-segmentation = { workspace = true }
|
|
84
84
|
stacker = { version = "0.1", optional = true }
|
|
85
85
|
ts-rs = { version = "12.0", features = ["serde-compat"], optional = true }
|
|
86
|
-
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.3.
|
|
86
|
+
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.3.9", optional = true, default-features = false }
|
|
87
87
|
|
|
88
88
|
[dev-dependencies]
|
|
89
89
|
pretty_assertions = "1.4"
|
|
@@ -294,6 +294,8 @@ pub fn alias(expr: Expr, name: &str) -> Expr {
|
|
|
294
294
|
this: expr.0,
|
|
295
295
|
alias: builder_identifier(name),
|
|
296
296
|
column_aliases: Vec::new(),
|
|
297
|
+
alias_explicit_as: false,
|
|
298
|
+
alias_keyword: None,
|
|
297
299
|
pre_alias_comments: Vec::new(),
|
|
298
300
|
trailing_comments: Vec::new(),
|
|
299
301
|
inferred_type: None,
|
|
@@ -1955,6 +1957,8 @@ pub fn subquery_expr(expr: Expression, alias_name: &str) -> Expr {
|
|
|
1955
1957
|
this: expr,
|
|
1956
1958
|
alias: Some(builder_identifier(alias_name)),
|
|
1957
1959
|
column_aliases: Vec::new(),
|
|
1960
|
+
alias_explicit_as: false,
|
|
1961
|
+
alias_keyword: None,
|
|
1958
1962
|
order_by: None,
|
|
1959
1963
|
limit: None,
|
|
1960
1964
|
offset: None,
|
|
@@ -683,6 +683,8 @@ impl DialectImpl for BigQueryDialect {
|
|
|
683
683
|
this: unnest,
|
|
684
684
|
alias: Identifier::new("_col"),
|
|
685
685
|
column_aliases: Vec::new(),
|
|
686
|
+
alias_explicit_as: false,
|
|
687
|
+
alias_keyword: None,
|
|
686
688
|
pre_alias_comments: Vec::new(),
|
|
687
689
|
trailing_comments: Vec::new(),
|
|
688
690
|
inferred_type: None,
|
|
@@ -42,6 +42,10 @@ impl DialectImpl for ClickHouseDialect {
|
|
|
42
42
|
config.hex_string_is_integer_type = true;
|
|
43
43
|
// ClickHouse allows underscores as digit separators in numeric literals
|
|
44
44
|
config.numbers_can_be_underscore_separated = true;
|
|
45
|
+
// SQLGlot tokenizes malformed SHOW LIKE probes such as `'a\' or 1=1`.
|
|
46
|
+
config.recover_terminal_backslash_quote = true;
|
|
47
|
+
// The ClickHouse corpus includes partial string probes extracted from shell tests.
|
|
48
|
+
config.recover_unterminated_string = true;
|
|
45
49
|
config
|
|
46
50
|
}
|
|
47
51
|
|
|
@@ -249,6 +253,12 @@ impl DialectImpl for ClickHouseDialect {
|
|
|
249
253
|
// IF(cond, true, false) -> CASE WHEN cond THEN true ELSE false END
|
|
250
254
|
Expression::IfFunc(f) => {
|
|
251
255
|
let f = *f;
|
|
256
|
+
let has_aliased_arg = matches!(f.condition, Expression::Alias(_))
|
|
257
|
+
|| matches!(f.true_value, Expression::Alias(_))
|
|
258
|
+
|| matches!(f.false_value.as_ref(), Some(Expression::Alias(_)));
|
|
259
|
+
if has_aliased_arg {
|
|
260
|
+
return Ok(Expression::IfFunc(Box::new(f)));
|
|
261
|
+
}
|
|
252
262
|
Ok(Expression::Case(Box::new(Case {
|
|
253
263
|
operand: None,
|
|
254
264
|
whens: vec![(f.condition, f.true_value)],
|
|
@@ -225,6 +225,8 @@ impl DatabricksDialect {
|
|
|
225
225
|
this: pair[1].clone(),
|
|
226
226
|
alias: crate::expressions::Identifier::new(field_name),
|
|
227
227
|
column_aliases: Vec::new(),
|
|
228
|
+
alias_explicit_as: false,
|
|
229
|
+
alias_keyword: None,
|
|
228
230
|
pre_alias_comments: Vec::new(),
|
|
229
231
|
trailing_comments: Vec::new(),
|
|
230
232
|
inferred_type: None,
|
|
@@ -1212,6 +1212,8 @@ impl DialectImpl for DuckDBDialect {
|
|
|
1212
1212
|
this: value,
|
|
1213
1213
|
alias,
|
|
1214
1214
|
column_aliases: Vec::new(),
|
|
1215
|
+
alias_explicit_as: false,
|
|
1216
|
+
alias_keyword: None,
|
|
1215
1217
|
pre_alias_comments: Vec::new(),
|
|
1216
1218
|
trailing_comments: Vec::new(),
|
|
1217
1219
|
inferred_type: None,
|
|
@@ -1418,6 +1420,8 @@ impl DuckDBDialect {
|
|
|
1418
1420
|
this: stmt,
|
|
1419
1421
|
alias: None,
|
|
1420
1422
|
column_aliases: Vec::new(),
|
|
1423
|
+
alias_explicit_as: false,
|
|
1424
|
+
alias_keyword: None,
|
|
1421
1425
|
order_by: None,
|
|
1422
1426
|
limit: None,
|
|
1423
1427
|
offset: None,
|
|
@@ -158,7 +158,10 @@ pub use trino::TrinoDialect;
|
|
|
158
158
|
pub use tsql::TSQLDialect;
|
|
159
159
|
|
|
160
160
|
use crate::error::Result;
|
|
161
|
-
use crate::expressions::{
|
|
161
|
+
use crate::expressions::{
|
|
162
|
+
Expression, From, Function, FunctionBody, Identifier, Join, Null, OrderBy, OutputClause,
|
|
163
|
+
TableRef, With,
|
|
164
|
+
};
|
|
162
165
|
use crate::generator::{Generator, GeneratorConfig};
|
|
163
166
|
use crate::parser::Parser;
|
|
164
167
|
use crate::tokens::{Token, TokenType, Tokenizer, TokenizerConfig};
|
|
@@ -1661,6 +1664,122 @@ where
|
|
|
1661
1664
|
}
|
|
1662
1665
|
}
|
|
1663
1666
|
|
|
1667
|
+
fn transform_table_ref_recursive<F>(table: TableRef, transform_fn: &F) -> Result<TableRef>
|
|
1668
|
+
where
|
|
1669
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1670
|
+
{
|
|
1671
|
+
match transform_recursive(Expression::Table(Box::new(table)), transform_fn)? {
|
|
1672
|
+
Expression::Table(table) => Ok(*table),
|
|
1673
|
+
_ => Err(crate::error::Error::parse(
|
|
1674
|
+
"TableRef transformation returned non-table expression",
|
|
1675
|
+
0,
|
|
1676
|
+
0,
|
|
1677
|
+
0,
|
|
1678
|
+
0,
|
|
1679
|
+
)),
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
fn transform_from_recursive<F>(from: From, transform_fn: &F) -> Result<From>
|
|
1684
|
+
where
|
|
1685
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1686
|
+
{
|
|
1687
|
+
match transform_recursive(Expression::From(Box::new(from)), transform_fn)? {
|
|
1688
|
+
Expression::From(from) => Ok(*from),
|
|
1689
|
+
_ => Err(crate::error::Error::parse(
|
|
1690
|
+
"FROM transformation returned non-FROM expression",
|
|
1691
|
+
0,
|
|
1692
|
+
0,
|
|
1693
|
+
0,
|
|
1694
|
+
0,
|
|
1695
|
+
)),
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
fn transform_join_recursive<F>(mut join: Join, transform_fn: &F) -> Result<Join>
|
|
1700
|
+
where
|
|
1701
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1702
|
+
{
|
|
1703
|
+
join.this = transform_recursive(join.this, transform_fn)?;
|
|
1704
|
+
if let Some(on) = join.on.take() {
|
|
1705
|
+
join.on = Some(transform_recursive(on, transform_fn)?);
|
|
1706
|
+
}
|
|
1707
|
+
if let Some(match_condition) = join.match_condition.take() {
|
|
1708
|
+
join.match_condition = Some(transform_recursive(match_condition, transform_fn)?);
|
|
1709
|
+
}
|
|
1710
|
+
join.pivots = join
|
|
1711
|
+
.pivots
|
|
1712
|
+
.into_iter()
|
|
1713
|
+
.map(|pivot| transform_recursive(pivot, transform_fn))
|
|
1714
|
+
.collect::<Result<Vec<_>>>()?;
|
|
1715
|
+
|
|
1716
|
+
match transform_fn(Expression::Join(Box::new(join)))? {
|
|
1717
|
+
Expression::Join(join) => Ok(*join),
|
|
1718
|
+
_ => Err(crate::error::Error::parse(
|
|
1719
|
+
"Join transformation returned non-join expression",
|
|
1720
|
+
0,
|
|
1721
|
+
0,
|
|
1722
|
+
0,
|
|
1723
|
+
0,
|
|
1724
|
+
)),
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
fn transform_output_clause_recursive<F>(
|
|
1729
|
+
mut output: OutputClause,
|
|
1730
|
+
transform_fn: &F,
|
|
1731
|
+
) -> Result<OutputClause>
|
|
1732
|
+
where
|
|
1733
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1734
|
+
{
|
|
1735
|
+
output.columns = output
|
|
1736
|
+
.columns
|
|
1737
|
+
.into_iter()
|
|
1738
|
+
.map(|column| transform_recursive(column, transform_fn))
|
|
1739
|
+
.collect::<Result<Vec<_>>>()?;
|
|
1740
|
+
if let Some(into_table) = output.into_table.take() {
|
|
1741
|
+
output.into_table = Some(transform_recursive(into_table, transform_fn)?);
|
|
1742
|
+
}
|
|
1743
|
+
Ok(output)
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
fn transform_with_recursive<F>(mut with: With, transform_fn: &F) -> Result<With>
|
|
1747
|
+
where
|
|
1748
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1749
|
+
{
|
|
1750
|
+
with.ctes = with
|
|
1751
|
+
.ctes
|
|
1752
|
+
.into_iter()
|
|
1753
|
+
.map(|mut cte| {
|
|
1754
|
+
cte.this = transform_recursive(cte.this, transform_fn)?;
|
|
1755
|
+
Ok(cte)
|
|
1756
|
+
})
|
|
1757
|
+
.collect::<Result<Vec<_>>>()?;
|
|
1758
|
+
if let Some(search) = with.search.take() {
|
|
1759
|
+
with.search = Some(Box::new(transform_recursive(*search, transform_fn)?));
|
|
1760
|
+
}
|
|
1761
|
+
Ok(with)
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
fn transform_order_by_recursive<F>(mut order: OrderBy, transform_fn: &F) -> Result<OrderBy>
|
|
1765
|
+
where
|
|
1766
|
+
F: Fn(Expression) -> Result<Expression>,
|
|
1767
|
+
{
|
|
1768
|
+
order.expressions = order
|
|
1769
|
+
.expressions
|
|
1770
|
+
.into_iter()
|
|
1771
|
+
.map(|mut ordered| {
|
|
1772
|
+
let original = ordered.this.clone();
|
|
1773
|
+
ordered.this = transform_recursive(ordered.this, transform_fn).unwrap_or(original);
|
|
1774
|
+
match transform_fn(Expression::Ordered(Box::new(ordered.clone()))) {
|
|
1775
|
+
Ok(Expression::Ordered(transformed)) => Ok(*transformed),
|
|
1776
|
+
Ok(_) | Err(_) => Ok(ordered),
|
|
1777
|
+
}
|
|
1778
|
+
})
|
|
1779
|
+
.collect::<Result<Vec<_>>>()?;
|
|
1780
|
+
Ok(order)
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1664
1783
|
fn transform_recursive_reference<F>(expr: Expression, transform_fn: &F) -> Result<Expression>
|
|
1665
1784
|
where
|
|
1666
1785
|
F: Fn(Expression) -> Result<Expression>,
|
|
@@ -2377,6 +2496,17 @@ where
|
|
|
2377
2496
|
Expression::Insert(ins)
|
|
2378
2497
|
}
|
|
2379
2498
|
Expression::Update(mut upd) => {
|
|
2499
|
+
upd.table = transform_table_ref_recursive(upd.table, transform_fn)?;
|
|
2500
|
+
upd.extra_tables = upd
|
|
2501
|
+
.extra_tables
|
|
2502
|
+
.into_iter()
|
|
2503
|
+
.map(|table| transform_table_ref_recursive(table, transform_fn))
|
|
2504
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2505
|
+
upd.table_joins = upd
|
|
2506
|
+
.table_joins
|
|
2507
|
+
.into_iter()
|
|
2508
|
+
.map(|join| transform_join_recursive(join, transform_fn))
|
|
2509
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2380
2510
|
upd.set = upd
|
|
2381
2511
|
.set
|
|
2382
2512
|
.into_iter()
|
|
@@ -2385,17 +2515,75 @@ where
|
|
|
2385
2515
|
(id, new_val)
|
|
2386
2516
|
})
|
|
2387
2517
|
.collect();
|
|
2518
|
+
if let Some(from_clause) = upd.from_clause.take() {
|
|
2519
|
+
upd.from_clause = Some(transform_from_recursive(from_clause, transform_fn)?);
|
|
2520
|
+
}
|
|
2521
|
+
upd.from_joins = upd
|
|
2522
|
+
.from_joins
|
|
2523
|
+
.into_iter()
|
|
2524
|
+
.map(|join| transform_join_recursive(join, transform_fn))
|
|
2525
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2388
2526
|
if let Some(mut where_clause) = upd.where_clause.take() {
|
|
2389
2527
|
where_clause.this = transform_recursive(where_clause.this, transform_fn)?;
|
|
2390
2528
|
upd.where_clause = Some(where_clause);
|
|
2391
2529
|
}
|
|
2530
|
+
upd.returning = upd
|
|
2531
|
+
.returning
|
|
2532
|
+
.into_iter()
|
|
2533
|
+
.map(|expr| transform_recursive(expr, transform_fn))
|
|
2534
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2535
|
+
if let Some(output) = upd.output.take() {
|
|
2536
|
+
upd.output = Some(transform_output_clause_recursive(output, transform_fn)?);
|
|
2537
|
+
}
|
|
2538
|
+
if let Some(with) = upd.with.take() {
|
|
2539
|
+
upd.with = Some(transform_with_recursive(with, transform_fn)?);
|
|
2540
|
+
}
|
|
2541
|
+
if let Some(limit) = upd.limit.take() {
|
|
2542
|
+
upd.limit = Some(transform_recursive(limit, transform_fn)?);
|
|
2543
|
+
}
|
|
2544
|
+
if let Some(order_by) = upd.order_by.take() {
|
|
2545
|
+
upd.order_by = Some(transform_order_by_recursive(order_by, transform_fn)?);
|
|
2546
|
+
}
|
|
2392
2547
|
Expression::Update(upd)
|
|
2393
2548
|
}
|
|
2394
2549
|
Expression::Delete(mut del) => {
|
|
2550
|
+
del.table = transform_table_ref_recursive(del.table, transform_fn)?;
|
|
2551
|
+
del.using = del
|
|
2552
|
+
.using
|
|
2553
|
+
.into_iter()
|
|
2554
|
+
.map(|table| transform_table_ref_recursive(table, transform_fn))
|
|
2555
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2395
2556
|
if let Some(mut where_clause) = del.where_clause.take() {
|
|
2396
2557
|
where_clause.this = transform_recursive(where_clause.this, transform_fn)?;
|
|
2397
2558
|
del.where_clause = Some(where_clause);
|
|
2398
2559
|
}
|
|
2560
|
+
if let Some(output) = del.output.take() {
|
|
2561
|
+
del.output = Some(transform_output_clause_recursive(output, transform_fn)?);
|
|
2562
|
+
}
|
|
2563
|
+
if let Some(with) = del.with.take() {
|
|
2564
|
+
del.with = Some(transform_with_recursive(with, transform_fn)?);
|
|
2565
|
+
}
|
|
2566
|
+
if let Some(limit) = del.limit.take() {
|
|
2567
|
+
del.limit = Some(transform_recursive(limit, transform_fn)?);
|
|
2568
|
+
}
|
|
2569
|
+
if let Some(order_by) = del.order_by.take() {
|
|
2570
|
+
del.order_by = Some(transform_order_by_recursive(order_by, transform_fn)?);
|
|
2571
|
+
}
|
|
2572
|
+
del.returning = del
|
|
2573
|
+
.returning
|
|
2574
|
+
.into_iter()
|
|
2575
|
+
.map(|expr| transform_recursive(expr, transform_fn))
|
|
2576
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2577
|
+
del.tables = del
|
|
2578
|
+
.tables
|
|
2579
|
+
.into_iter()
|
|
2580
|
+
.map(|table| transform_table_ref_recursive(table, transform_fn))
|
|
2581
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2582
|
+
del.joins = del
|
|
2583
|
+
.joins
|
|
2584
|
+
.into_iter()
|
|
2585
|
+
.map(|join| transform_join_recursive(join, transform_fn))
|
|
2586
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2399
2587
|
Expression::Delete(del)
|
|
2400
2588
|
}
|
|
2401
2589
|
|
|
@@ -4605,6 +4793,8 @@ impl Dialect {
|
|
|
4605
4793
|
Identifier::new(&alias_name),
|
|
4606
4794
|
Identifier::new("this"),
|
|
4607
4795
|
],
|
|
4796
|
+
alias_explicit_as: false,
|
|
4797
|
+
alias_keyword: None,
|
|
4608
4798
|
pre_alias_comments: vec![],
|
|
4609
4799
|
trailing_comments: vec![],
|
|
4610
4800
|
inferred_type: None,
|
|
@@ -4695,6 +4885,8 @@ impl Dialect {
|
|
|
4695
4885
|
this: dateadd.clone(),
|
|
4696
4886
|
alias: Identifier::new(alias_name),
|
|
4697
4887
|
column_aliases: vec![],
|
|
4888
|
+
alias_explicit_as: false,
|
|
4889
|
+
alias_keyword: None,
|
|
4698
4890
|
pre_alias_comments: vec![],
|
|
4699
4891
|
trailing_comments: vec![],
|
|
4700
4892
|
inferred_type: None,
|
|
@@ -4707,6 +4899,8 @@ impl Dialect {
|
|
|
4707
4899
|
this: new_this,
|
|
4708
4900
|
alias: a.alias.clone(),
|
|
4709
4901
|
column_aliases: a.column_aliases.clone(),
|
|
4902
|
+
alias_explicit_as: false,
|
|
4903
|
+
alias_keyword: None,
|
|
4710
4904
|
pre_alias_comments: a.pre_alias_comments.clone(),
|
|
4711
4905
|
trailing_comments: a.trailing_comments.clone(),
|
|
4712
4906
|
inferred_type: None,
|
|
@@ -4916,6 +5110,8 @@ impl Dialect {
|
|
|
4916
5110
|
Identifier::new(&col_name),
|
|
4917
5111
|
Identifier::new("this"),
|
|
4918
5112
|
],
|
|
5113
|
+
alias_explicit_as: false,
|
|
5114
|
+
alias_keyword: None,
|
|
4919
5115
|
pre_alias_comments: vec![],
|
|
4920
5116
|
trailing_comments: vec![],
|
|
4921
5117
|
inferred_type: None,
|
|
@@ -4960,6 +5156,8 @@ impl Dialect {
|
|
|
4960
5156
|
this: dateadd_expr,
|
|
4961
5157
|
alias: Identifier::new(&col_name),
|
|
4962
5158
|
column_aliases: vec![],
|
|
5159
|
+
alias_explicit_as: false,
|
|
5160
|
+
alias_keyword: None,
|
|
4963
5161
|
pre_alias_comments: vec![],
|
|
4964
5162
|
trailing_comments: vec![],
|
|
4965
5163
|
inferred_type: None,
|
|
@@ -4977,6 +5175,8 @@ impl Dialect {
|
|
|
4977
5175
|
this: inner_select_expr,
|
|
4978
5176
|
alias: None,
|
|
4979
5177
|
column_aliases: vec![],
|
|
5178
|
+
alias_explicit_as: false,
|
|
5179
|
+
alias_keyword: None,
|
|
4980
5180
|
order_by: None,
|
|
4981
5181
|
limit: None,
|
|
4982
5182
|
offset: None,
|
|
@@ -4995,6 +5195,8 @@ impl Dialect {
|
|
|
4995
5195
|
this: subquery,
|
|
4996
5196
|
alias: Identifier::new(&alias_name),
|
|
4997
5197
|
column_aliases: col_aliases,
|
|
5198
|
+
alias_explicit_as: false,
|
|
5199
|
+
alias_keyword: None,
|
|
4998
5200
|
pre_alias_comments: vec![],
|
|
4999
5201
|
trailing_comments: vec![],
|
|
5000
5202
|
inferred_type: None,
|
|
@@ -5080,6 +5282,8 @@ impl Dialect {
|
|
|
5080
5282
|
Identifier::new(col_name),
|
|
5081
5283
|
Identifier::new("this"),
|
|
5082
5284
|
],
|
|
5285
|
+
alias_explicit_as: false,
|
|
5286
|
+
alias_keyword: None,
|
|
5083
5287
|
pre_alias_comments: vec![],
|
|
5084
5288
|
trailing_comments: vec![],
|
|
5085
5289
|
inferred_type: None,
|
|
@@ -5122,6 +5326,8 @@ impl Dialect {
|
|
|
5122
5326
|
this: dateadd_expr,
|
|
5123
5327
|
alias: Identifier::new(col_name),
|
|
5124
5328
|
column_aliases: vec![],
|
|
5329
|
+
alias_explicit_as: false,
|
|
5330
|
+
alias_keyword: None,
|
|
5125
5331
|
pre_alias_comments: vec![],
|
|
5126
5332
|
trailing_comments: vec![],
|
|
5127
5333
|
inferred_type: None,
|
|
@@ -5139,6 +5345,8 @@ impl Dialect {
|
|
|
5139
5345
|
this: Expression::Select(Box::new(inner_select)),
|
|
5140
5346
|
alias: None,
|
|
5141
5347
|
column_aliases: vec![],
|
|
5348
|
+
alias_explicit_as: false,
|
|
5349
|
+
alias_keyword: None,
|
|
5142
5350
|
order_by: None,
|
|
5143
5351
|
limit: None,
|
|
5144
5352
|
offset: None,
|
|
@@ -5183,6 +5391,8 @@ impl Dialect {
|
|
|
5183
5391
|
this: Expression::Select(Box::new(outer_select)),
|
|
5184
5392
|
alias: None,
|
|
5185
5393
|
column_aliases: vec![],
|
|
5394
|
+
alias_explicit_as: false,
|
|
5395
|
+
alias_keyword: None,
|
|
5186
5396
|
order_by: None,
|
|
5187
5397
|
limit: None,
|
|
5188
5398
|
offset: None,
|
|
@@ -5776,6 +5986,8 @@ impl Dialect {
|
|
|
5776
5986
|
this: Expression::Values(vals.clone()),
|
|
5777
5987
|
alias: Some(Identifier::new("_values".to_string())),
|
|
5778
5988
|
column_aliases: Vec::new(),
|
|
5989
|
+
alias_explicit_as: false,
|
|
5990
|
+
alias_keyword: None,
|
|
5779
5991
|
order_by: None,
|
|
5780
5992
|
limit: None,
|
|
5781
5993
|
offset: None,
|
|
@@ -6398,6 +6610,8 @@ impl Dialect {
|
|
|
6398
6610
|
this: Expression::Select(Box::new(inner_select)),
|
|
6399
6611
|
alias: Some(a.alias.clone()),
|
|
6400
6612
|
column_aliases: Vec::new(),
|
|
6613
|
+
alias_explicit_as: false,
|
|
6614
|
+
alias_keyword: None,
|
|
6401
6615
|
order_by: None,
|
|
6402
6616
|
limit: None,
|
|
6403
6617
|
offset: None,
|
|
@@ -6505,6 +6719,8 @@ impl Dialect {
|
|
|
6505
6719
|
this: unnest_expr,
|
|
6506
6720
|
alias: Identifier::new("_t0"),
|
|
6507
6721
|
column_aliases: vec![alias.clone()],
|
|
6722
|
+
alias_explicit_as: false,
|
|
6723
|
+
alias_keyword: None,
|
|
6508
6724
|
pre_alias_comments: vec![],
|
|
6509
6725
|
trailing_comments: vec![],
|
|
6510
6726
|
inferred_type: None,
|
|
@@ -6517,6 +6733,8 @@ impl Dialect {
|
|
|
6517
6733
|
this: unnest_expr,
|
|
6518
6734
|
alias: alias.clone(),
|
|
6519
6735
|
column_aliases: vec![],
|
|
6736
|
+
alias_explicit_as: false,
|
|
6737
|
+
alias_keyword: None,
|
|
6520
6738
|
pre_alias_comments: vec![],
|
|
6521
6739
|
trailing_comments: vec![],
|
|
6522
6740
|
inferred_type: None,
|
|
@@ -9756,6 +9974,8 @@ impl Dialect {
|
|
|
9756
9974
|
this: Expression::Select(Box::new(new_select)),
|
|
9757
9975
|
alias: None,
|
|
9758
9976
|
column_aliases: Vec::new(),
|
|
9977
|
+
alias_explicit_as: false,
|
|
9978
|
+
alias_keyword: None,
|
|
9759
9979
|
order_by: None,
|
|
9760
9980
|
limit: None,
|
|
9761
9981
|
offset: None,
|
|
@@ -21143,6 +21363,8 @@ impl Dialect {
|
|
|
21143
21363
|
this: unnest_expr,
|
|
21144
21364
|
alias: u_id.clone(),
|
|
21145
21365
|
column_aliases: Vec::new(),
|
|
21366
|
+
alias_explicit_as: false,
|
|
21367
|
+
alias_keyword: None,
|
|
21146
21368
|
pre_alias_comments: Vec::new(),
|
|
21147
21369
|
trailing_comments: Vec::new(),
|
|
21148
21370
|
inferred_type: None,
|
|
@@ -28077,6 +28299,8 @@ impl Dialect {
|
|
|
28077
28299
|
)),
|
|
28078
28300
|
alias: Identifier::new("_t0"),
|
|
28079
28301
|
column_aliases: vec![Identifier::new(¶m_name)],
|
|
28302
|
+
alias_explicit_as: false,
|
|
28303
|
+
alias_keyword: None,
|
|
28080
28304
|
pre_alias_comments: Vec::new(),
|
|
28081
28305
|
trailing_comments: Vec::new(),
|
|
28082
28306
|
inferred_type: None,
|
|
@@ -30368,6 +30592,8 @@ impl Dialect {
|
|
|
30368
30592
|
this: unnest_expr,
|
|
30369
30593
|
alias: u_id.clone(),
|
|
30370
30594
|
column_aliases: Vec::new(),
|
|
30595
|
+
alias_explicit_as: false,
|
|
30596
|
+
alias_keyword: None,
|
|
30371
30597
|
pre_alias_comments: Vec::new(),
|
|
30372
30598
|
trailing_comments: Vec::new(),
|
|
30373
30599
|
inferred_type: None,
|
|
@@ -31026,6 +31252,8 @@ impl Dialect {
|
|
|
31026
31252
|
this: series_unnest_expr,
|
|
31027
31253
|
alias: Identifier::new(series_source_alias.clone()),
|
|
31028
31254
|
column_aliases: col_aliases,
|
|
31255
|
+
alias_explicit_as: false,
|
|
31256
|
+
alias_keyword: None,
|
|
31029
31257
|
pre_alias_comments: Vec::new(),
|
|
31030
31258
|
trailing_comments: Vec::new(),
|
|
31031
31259
|
inferred_type: None,
|
|
@@ -31069,6 +31297,8 @@ impl Dialect {
|
|
|
31069
31297
|
Identifier::new(actual_col_name.clone()),
|
|
31070
31298
|
Identifier::new(info.pos_alias.clone()),
|
|
31071
31299
|
],
|
|
31300
|
+
alias_explicit_as: false,
|
|
31301
|
+
alias_keyword: None,
|
|
31072
31302
|
pre_alias_comments: Vec::new(),
|
|
31073
31303
|
trailing_comments: Vec::new(),
|
|
31074
31304
|
inferred_type: None,
|
|
@@ -31100,6 +31330,8 @@ impl Dialect {
|
|
|
31100
31330
|
Identifier::new(actual_col_name.clone()),
|
|
31101
31331
|
Identifier::new("this".to_string()),
|
|
31102
31332
|
],
|
|
31333
|
+
alias_explicit_as: false,
|
|
31334
|
+
alias_keyword: None,
|
|
31103
31335
|
pre_alias_comments: Vec::new(),
|
|
31104
31336
|
trailing_comments: Vec::new(),
|
|
31105
31337
|
inferred_type: None,
|
|
@@ -32016,7 +32248,7 @@ impl Dialect {
|
|
|
32016
32248
|
match unit.trim().to_ascii_uppercase().as_str() {
|
|
32017
32249
|
"YEAR" | "YEARS" => Some(IntervalUnit::Year),
|
|
32018
32250
|
"QUARTER" | "QUARTERS" => Some(IntervalUnit::Quarter),
|
|
32019
|
-
"MONTH" | "MONTHS" => Some(IntervalUnit::Month),
|
|
32251
|
+
"MONTH" | "MONTHS" | "MON" | "MONS" | "MM" => Some(IntervalUnit::Month),
|
|
32020
32252
|
"WEEK" | "WEEKS" | "ISOWEEK" => Some(IntervalUnit::Week),
|
|
32021
32253
|
"DAY" | "DAYS" => Some(IntervalUnit::Day),
|
|
32022
32254
|
"HOUR" | "HOURS" => Some(IntervalUnit::Hour),
|
|
@@ -36688,7 +36920,9 @@ impl Dialect {
|
|
|
36688
36920
|
match s {
|
|
36689
36921
|
"YEAR" | "YY" | "YYYY" => crate::expressions::IntervalUnit::Year,
|
|
36690
36922
|
"QUARTER" | "QQ" | "Q" => crate::expressions::IntervalUnit::Quarter,
|
|
36691
|
-
"MONTH" | "MM" | "M" =>
|
|
36923
|
+
"MONTH" | "MONTHS" | "MON" | "MONS" | "MM" | "M" => {
|
|
36924
|
+
crate::expressions::IntervalUnit::Month
|
|
36925
|
+
}
|
|
36692
36926
|
"WEEK" | "WK" | "WW" | "ISOWEEK" => crate::expressions::IntervalUnit::Week,
|
|
36693
36927
|
"DAY" | "DD" | "D" | "DY" => crate::expressions::IntervalUnit::Day,
|
|
36694
36928
|
"HOUR" | "HH" => crate::expressions::IntervalUnit::Hour,
|
|
@@ -117,6 +117,8 @@ impl DialectImpl for SnowflakeDialect {
|
|
|
117
117
|
this: inner,
|
|
118
118
|
alias: None,
|
|
119
119
|
column_aliases: Vec::new(),
|
|
120
|
+
alias_explicit_as: false,
|
|
121
|
+
alias_keyword: None,
|
|
120
122
|
order_by: None,
|
|
121
123
|
limit: None,
|
|
122
124
|
offset: None,
|
|
@@ -394,6 +396,8 @@ impl DialectImpl for SnowflakeDialect {
|
|
|
394
396
|
crate::expressions::Identifier::new("value"),
|
|
395
397
|
crate::expressions::Identifier::new("this"),
|
|
396
398
|
],
|
|
399
|
+
alias_explicit_as: false,
|
|
400
|
+
alias_keyword: None,
|
|
397
401
|
pre_alias_comments: vec![],
|
|
398
402
|
trailing_comments: vec![],
|
|
399
403
|
inferred_type: None,
|
|
@@ -628,6 +628,8 @@ impl SparkDialect {
|
|
|
628
628
|
this: arg,
|
|
629
629
|
alias: crate::expressions::Identifier::new(&name),
|
|
630
630
|
column_aliases: Vec::new(),
|
|
631
|
+
alias_explicit_as: false,
|
|
632
|
+
alias_keyword: None,
|
|
631
633
|
pre_alias_comments: Vec::new(),
|
|
632
634
|
trailing_comments: Vec::new(),
|
|
633
635
|
inferred_type: None,
|
|
@@ -640,6 +642,8 @@ impl SparkDialect {
|
|
|
640
642
|
this: arg,
|
|
641
643
|
alias: crate::expressions::Identifier::new(&name),
|
|
642
644
|
column_aliases: Vec::new(),
|
|
645
|
+
alias_explicit_as: false,
|
|
646
|
+
alias_keyword: None,
|
|
643
647
|
pre_alias_comments: Vec::new(),
|
|
644
648
|
trailing_comments: Vec::new(),
|
|
645
649
|
inferred_type: None,
|
|
@@ -673,6 +677,8 @@ impl SparkDialect {
|
|
|
673
677
|
this: pair[1].clone(),
|
|
674
678
|
alias: crate::expressions::Identifier::new(field_name),
|
|
675
679
|
column_aliases: Vec::new(),
|
|
680
|
+
alias_explicit_as: false,
|
|
681
|
+
alias_keyword: None,
|
|
676
682
|
pre_alias_comments: Vec::new(),
|
|
677
683
|
trailing_comments: Vec::new(),
|
|
678
684
|
inferred_type: None,
|
|
@@ -855,6 +861,8 @@ impl SparkDialect {
|
|
|
855
861
|
this: pair[1].clone(),
|
|
856
862
|
alias: crate::expressions::Identifier::new(key.clone()),
|
|
857
863
|
column_aliases: vec![],
|
|
864
|
+
alias_explicit_as: false,
|
|
865
|
+
alias_keyword: None,
|
|
858
866
|
pre_alias_comments: vec![],
|
|
859
867
|
trailing_comments: vec![],
|
|
860
868
|
inferred_type: None,
|
|
@@ -126,6 +126,8 @@ impl DialectImpl for TSQLDialect {
|
|
|
126
126
|
this: op.right,
|
|
127
127
|
alias: col.name.clone(),
|
|
128
128
|
column_aliases: Vec::new(),
|
|
129
|
+
alias_explicit_as: false,
|
|
130
|
+
alias_keyword: None,
|
|
129
131
|
pre_alias_comments: Vec::new(),
|
|
130
132
|
trailing_comments: Vec::new(),
|
|
131
133
|
inferred_type: None,
|
|
@@ -138,6 +140,8 @@ impl DialectImpl for TSQLDialect {
|
|
|
138
140
|
this: op.right,
|
|
139
141
|
alias: ident.clone(),
|
|
140
142
|
column_aliases: Vec::new(),
|
|
143
|
+
alias_explicit_as: false,
|
|
144
|
+
alias_keyword: None,
|
|
141
145
|
pre_alias_comments: Vec::new(),
|
|
142
146
|
trailing_comments: Vec::new(),
|
|
143
147
|
inferred_type: None,
|
|
@@ -1217,6 +1221,8 @@ impl TSQLDialect {
|
|
|
1217
1221
|
span: None,
|
|
1218
1222
|
},
|
|
1219
1223
|
column_aliases: Vec::new(),
|
|
1224
|
+
alias_explicit_as: false,
|
|
1225
|
+
alias_keyword: None,
|
|
1220
1226
|
pre_alias_comments: Vec::new(),
|
|
1221
1227
|
trailing_comments: Vec::new(),
|
|
1222
1228
|
inferred_type: None,
|