polyglot-sql 0.3.6__tar.gz → 0.3.7__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.7}/Cargo.lock +5 -5
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/Cargo.toml +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/PKG-INFO +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/Cargo.toml +1 -1
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/builder.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/bigquery.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/clickhouse.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/databricks.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/duckdb.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/mod.rs +44 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/snowflake.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/spark.rs +8 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/tsql.rs +6 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/expressions.rs +20 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/generator.rs +330 -133
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/canonicalize.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +2 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +4 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +10 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/subquery.rs +6 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/parser.rs +730 -137
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/tokens.rs +39 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/transforms.rs +66 -0
- polyglot_sql-0.3.7/crates/polyglot-sql/tests/clickhouse_regression.rs +159 -0
- polyglot_sql-0.3.7/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +168 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/deep_nesting_regression.rs +2 -0
- 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 → polyglot_sql-0.3.7}/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/lineage.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/scope.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/traversal.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/error_handling.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/fabric_regression.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/transform_regression.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql/tests/tsql_regression.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/README.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/docs/index.md +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/pyproject.toml +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/python/polyglot_sql/__init__.py +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/python/polyglot_sql/__init__.pyi +0 -0
- {polyglot_sql-0.3.6 → polyglot_sql-0.3.7}/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.7"
|
|
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.7"
|
|
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.7"
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
637
637
|
name = "polyglot-sql-python"
|
|
638
|
-
version = "0.3.
|
|
638
|
+
version = "0.3.7"
|
|
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.7"
|
|
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.7", 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,
|
|
@@ -4605,6 +4605,8 @@ impl Dialect {
|
|
|
4605
4605
|
Identifier::new(&alias_name),
|
|
4606
4606
|
Identifier::new("this"),
|
|
4607
4607
|
],
|
|
4608
|
+
alias_explicit_as: false,
|
|
4609
|
+
alias_keyword: None,
|
|
4608
4610
|
pre_alias_comments: vec![],
|
|
4609
4611
|
trailing_comments: vec![],
|
|
4610
4612
|
inferred_type: None,
|
|
@@ -4695,6 +4697,8 @@ impl Dialect {
|
|
|
4695
4697
|
this: dateadd.clone(),
|
|
4696
4698
|
alias: Identifier::new(alias_name),
|
|
4697
4699
|
column_aliases: vec![],
|
|
4700
|
+
alias_explicit_as: false,
|
|
4701
|
+
alias_keyword: None,
|
|
4698
4702
|
pre_alias_comments: vec![],
|
|
4699
4703
|
trailing_comments: vec![],
|
|
4700
4704
|
inferred_type: None,
|
|
@@ -4707,6 +4711,8 @@ impl Dialect {
|
|
|
4707
4711
|
this: new_this,
|
|
4708
4712
|
alias: a.alias.clone(),
|
|
4709
4713
|
column_aliases: a.column_aliases.clone(),
|
|
4714
|
+
alias_explicit_as: false,
|
|
4715
|
+
alias_keyword: None,
|
|
4710
4716
|
pre_alias_comments: a.pre_alias_comments.clone(),
|
|
4711
4717
|
trailing_comments: a.trailing_comments.clone(),
|
|
4712
4718
|
inferred_type: None,
|
|
@@ -4916,6 +4922,8 @@ impl Dialect {
|
|
|
4916
4922
|
Identifier::new(&col_name),
|
|
4917
4923
|
Identifier::new("this"),
|
|
4918
4924
|
],
|
|
4925
|
+
alias_explicit_as: false,
|
|
4926
|
+
alias_keyword: None,
|
|
4919
4927
|
pre_alias_comments: vec![],
|
|
4920
4928
|
trailing_comments: vec![],
|
|
4921
4929
|
inferred_type: None,
|
|
@@ -4960,6 +4968,8 @@ impl Dialect {
|
|
|
4960
4968
|
this: dateadd_expr,
|
|
4961
4969
|
alias: Identifier::new(&col_name),
|
|
4962
4970
|
column_aliases: vec![],
|
|
4971
|
+
alias_explicit_as: false,
|
|
4972
|
+
alias_keyword: None,
|
|
4963
4973
|
pre_alias_comments: vec![],
|
|
4964
4974
|
trailing_comments: vec![],
|
|
4965
4975
|
inferred_type: None,
|
|
@@ -4977,6 +4987,8 @@ impl Dialect {
|
|
|
4977
4987
|
this: inner_select_expr,
|
|
4978
4988
|
alias: None,
|
|
4979
4989
|
column_aliases: vec![],
|
|
4990
|
+
alias_explicit_as: false,
|
|
4991
|
+
alias_keyword: None,
|
|
4980
4992
|
order_by: None,
|
|
4981
4993
|
limit: None,
|
|
4982
4994
|
offset: None,
|
|
@@ -4995,6 +5007,8 @@ impl Dialect {
|
|
|
4995
5007
|
this: subquery,
|
|
4996
5008
|
alias: Identifier::new(&alias_name),
|
|
4997
5009
|
column_aliases: col_aliases,
|
|
5010
|
+
alias_explicit_as: false,
|
|
5011
|
+
alias_keyword: None,
|
|
4998
5012
|
pre_alias_comments: vec![],
|
|
4999
5013
|
trailing_comments: vec![],
|
|
5000
5014
|
inferred_type: None,
|
|
@@ -5080,6 +5094,8 @@ impl Dialect {
|
|
|
5080
5094
|
Identifier::new(col_name),
|
|
5081
5095
|
Identifier::new("this"),
|
|
5082
5096
|
],
|
|
5097
|
+
alias_explicit_as: false,
|
|
5098
|
+
alias_keyword: None,
|
|
5083
5099
|
pre_alias_comments: vec![],
|
|
5084
5100
|
trailing_comments: vec![],
|
|
5085
5101
|
inferred_type: None,
|
|
@@ -5122,6 +5138,8 @@ impl Dialect {
|
|
|
5122
5138
|
this: dateadd_expr,
|
|
5123
5139
|
alias: Identifier::new(col_name),
|
|
5124
5140
|
column_aliases: vec![],
|
|
5141
|
+
alias_explicit_as: false,
|
|
5142
|
+
alias_keyword: None,
|
|
5125
5143
|
pre_alias_comments: vec![],
|
|
5126
5144
|
trailing_comments: vec![],
|
|
5127
5145
|
inferred_type: None,
|
|
@@ -5139,6 +5157,8 @@ impl Dialect {
|
|
|
5139
5157
|
this: Expression::Select(Box::new(inner_select)),
|
|
5140
5158
|
alias: None,
|
|
5141
5159
|
column_aliases: vec![],
|
|
5160
|
+
alias_explicit_as: false,
|
|
5161
|
+
alias_keyword: None,
|
|
5142
5162
|
order_by: None,
|
|
5143
5163
|
limit: None,
|
|
5144
5164
|
offset: None,
|
|
@@ -5183,6 +5203,8 @@ impl Dialect {
|
|
|
5183
5203
|
this: Expression::Select(Box::new(outer_select)),
|
|
5184
5204
|
alias: None,
|
|
5185
5205
|
column_aliases: vec![],
|
|
5206
|
+
alias_explicit_as: false,
|
|
5207
|
+
alias_keyword: None,
|
|
5186
5208
|
order_by: None,
|
|
5187
5209
|
limit: None,
|
|
5188
5210
|
offset: None,
|
|
@@ -5776,6 +5798,8 @@ impl Dialect {
|
|
|
5776
5798
|
this: Expression::Values(vals.clone()),
|
|
5777
5799
|
alias: Some(Identifier::new("_values".to_string())),
|
|
5778
5800
|
column_aliases: Vec::new(),
|
|
5801
|
+
alias_explicit_as: false,
|
|
5802
|
+
alias_keyword: None,
|
|
5779
5803
|
order_by: None,
|
|
5780
5804
|
limit: None,
|
|
5781
5805
|
offset: None,
|
|
@@ -6398,6 +6422,8 @@ impl Dialect {
|
|
|
6398
6422
|
this: Expression::Select(Box::new(inner_select)),
|
|
6399
6423
|
alias: Some(a.alias.clone()),
|
|
6400
6424
|
column_aliases: Vec::new(),
|
|
6425
|
+
alias_explicit_as: false,
|
|
6426
|
+
alias_keyword: None,
|
|
6401
6427
|
order_by: None,
|
|
6402
6428
|
limit: None,
|
|
6403
6429
|
offset: None,
|
|
@@ -6505,6 +6531,8 @@ impl Dialect {
|
|
|
6505
6531
|
this: unnest_expr,
|
|
6506
6532
|
alias: Identifier::new("_t0"),
|
|
6507
6533
|
column_aliases: vec![alias.clone()],
|
|
6534
|
+
alias_explicit_as: false,
|
|
6535
|
+
alias_keyword: None,
|
|
6508
6536
|
pre_alias_comments: vec![],
|
|
6509
6537
|
trailing_comments: vec![],
|
|
6510
6538
|
inferred_type: None,
|
|
@@ -6517,6 +6545,8 @@ impl Dialect {
|
|
|
6517
6545
|
this: unnest_expr,
|
|
6518
6546
|
alias: alias.clone(),
|
|
6519
6547
|
column_aliases: vec![],
|
|
6548
|
+
alias_explicit_as: false,
|
|
6549
|
+
alias_keyword: None,
|
|
6520
6550
|
pre_alias_comments: vec![],
|
|
6521
6551
|
trailing_comments: vec![],
|
|
6522
6552
|
inferred_type: None,
|
|
@@ -9756,6 +9786,8 @@ impl Dialect {
|
|
|
9756
9786
|
this: Expression::Select(Box::new(new_select)),
|
|
9757
9787
|
alias: None,
|
|
9758
9788
|
column_aliases: Vec::new(),
|
|
9789
|
+
alias_explicit_as: false,
|
|
9790
|
+
alias_keyword: None,
|
|
9759
9791
|
order_by: None,
|
|
9760
9792
|
limit: None,
|
|
9761
9793
|
offset: None,
|
|
@@ -21143,6 +21175,8 @@ impl Dialect {
|
|
|
21143
21175
|
this: unnest_expr,
|
|
21144
21176
|
alias: u_id.clone(),
|
|
21145
21177
|
column_aliases: Vec::new(),
|
|
21178
|
+
alias_explicit_as: false,
|
|
21179
|
+
alias_keyword: None,
|
|
21146
21180
|
pre_alias_comments: Vec::new(),
|
|
21147
21181
|
trailing_comments: Vec::new(),
|
|
21148
21182
|
inferred_type: None,
|
|
@@ -28077,6 +28111,8 @@ impl Dialect {
|
|
|
28077
28111
|
)),
|
|
28078
28112
|
alias: Identifier::new("_t0"),
|
|
28079
28113
|
column_aliases: vec![Identifier::new(¶m_name)],
|
|
28114
|
+
alias_explicit_as: false,
|
|
28115
|
+
alias_keyword: None,
|
|
28080
28116
|
pre_alias_comments: Vec::new(),
|
|
28081
28117
|
trailing_comments: Vec::new(),
|
|
28082
28118
|
inferred_type: None,
|
|
@@ -30368,6 +30404,8 @@ impl Dialect {
|
|
|
30368
30404
|
this: unnest_expr,
|
|
30369
30405
|
alias: u_id.clone(),
|
|
30370
30406
|
column_aliases: Vec::new(),
|
|
30407
|
+
alias_explicit_as: false,
|
|
30408
|
+
alias_keyword: None,
|
|
30371
30409
|
pre_alias_comments: Vec::new(),
|
|
30372
30410
|
trailing_comments: Vec::new(),
|
|
30373
30411
|
inferred_type: None,
|
|
@@ -31026,6 +31064,8 @@ impl Dialect {
|
|
|
31026
31064
|
this: series_unnest_expr,
|
|
31027
31065
|
alias: Identifier::new(series_source_alias.clone()),
|
|
31028
31066
|
column_aliases: col_aliases,
|
|
31067
|
+
alias_explicit_as: false,
|
|
31068
|
+
alias_keyword: None,
|
|
31029
31069
|
pre_alias_comments: Vec::new(),
|
|
31030
31070
|
trailing_comments: Vec::new(),
|
|
31031
31071
|
inferred_type: None,
|
|
@@ -31069,6 +31109,8 @@ impl Dialect {
|
|
|
31069
31109
|
Identifier::new(actual_col_name.clone()),
|
|
31070
31110
|
Identifier::new(info.pos_alias.clone()),
|
|
31071
31111
|
],
|
|
31112
|
+
alias_explicit_as: false,
|
|
31113
|
+
alias_keyword: None,
|
|
31072
31114
|
pre_alias_comments: Vec::new(),
|
|
31073
31115
|
trailing_comments: Vec::new(),
|
|
31074
31116
|
inferred_type: None,
|
|
@@ -31100,6 +31142,8 @@ impl Dialect {
|
|
|
31100
31142
|
Identifier::new(actual_col_name.clone()),
|
|
31101
31143
|
Identifier::new("this".to_string()),
|
|
31102
31144
|
],
|
|
31145
|
+
alias_explicit_as: false,
|
|
31146
|
+
alias_keyword: None,
|
|
31103
31147
|
pre_alias_comments: Vec::new(),
|
|
31104
31148
|
trailing_comments: Vec::new(),
|
|
31105
31149
|
inferred_type: None,
|
|
@@ -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,
|
|
@@ -4011,6 +4011,12 @@ pub struct Subquery {
|
|
|
4011
4011
|
pub alias: Option<Identifier>,
|
|
4012
4012
|
/// Optional column aliases: AS t(c1, c2)
|
|
4013
4013
|
pub column_aliases: Vec<Identifier>,
|
|
4014
|
+
/// Whether AS keyword was explicitly used for the alias.
|
|
4015
|
+
#[serde(default)]
|
|
4016
|
+
pub alias_explicit_as: bool,
|
|
4017
|
+
/// Original alias keyword spelling, e.g. `AS` vs `as`.
|
|
4018
|
+
#[serde(skip_serializing_if = "Option::is_none", default)]
|
|
4019
|
+
pub alias_keyword: Option<String>,
|
|
4014
4020
|
/// ORDER BY clause (for parenthesized queries)
|
|
4015
4021
|
pub order_by: Option<OrderBy>,
|
|
4016
4022
|
/// LIMIT clause
|
|
@@ -4493,6 +4499,12 @@ pub struct Alias {
|
|
|
4493
4499
|
/// Optional column aliases for table-valued functions: AS t(col1, col2) or AS (col1, col2)
|
|
4494
4500
|
#[serde(default)]
|
|
4495
4501
|
pub column_aliases: Vec<Identifier>,
|
|
4502
|
+
/// Whether AS keyword was explicitly used for the alias.
|
|
4503
|
+
#[serde(default)]
|
|
4504
|
+
pub alias_explicit_as: bool,
|
|
4505
|
+
/// Original alias keyword spelling, e.g. `AS` vs `as`.
|
|
4506
|
+
#[serde(skip_serializing_if = "Option::is_none", default)]
|
|
4507
|
+
pub alias_keyword: Option<String>,
|
|
4496
4508
|
/// Comments that appeared between the expression and AS keyword
|
|
4497
4509
|
#[serde(default)]
|
|
4498
4510
|
pub pre_alias_comments: Vec<String>,
|
|
@@ -4511,6 +4523,8 @@ impl Alias {
|
|
|
4511
4523
|
this,
|
|
4512
4524
|
alias,
|
|
4513
4525
|
column_aliases: Vec::new(),
|
|
4526
|
+
alias_explicit_as: false,
|
|
4527
|
+
alias_keyword: None,
|
|
4514
4528
|
pre_alias_comments: Vec::new(),
|
|
4515
4529
|
trailing_comments: Vec::new(),
|
|
4516
4530
|
inferred_type: None,
|
|
@@ -4523,6 +4537,8 @@ impl Alias {
|
|
|
4523
4537
|
this,
|
|
4524
4538
|
alias: Identifier::empty(),
|
|
4525
4539
|
column_aliases,
|
|
4540
|
+
alias_explicit_as: false,
|
|
4541
|
+
alias_keyword: None,
|
|
4526
4542
|
pre_alias_comments: Vec::new(),
|
|
4527
4543
|
trailing_comments: Vec::new(),
|
|
4528
4544
|
inferred_type: None,
|
|
@@ -8436,6 +8452,9 @@ pub struct CreateView {
|
|
|
8436
8452
|
/// Redshift: AUTO REFRESH YES|NO for materialized views
|
|
8437
8453
|
#[serde(skip_serializing_if = "Option::is_none", default)]
|
|
8438
8454
|
pub auto_refresh: Option<bool>,
|
|
8455
|
+
/// ClickHouse: POPULATE / EMPTY before AS in materialized views
|
|
8456
|
+
#[serde(skip_serializing_if = "Option::is_none", default)]
|
|
8457
|
+
pub clickhouse_population: Option<String>,
|
|
8439
8458
|
/// ClickHouse: ON CLUSTER clause
|
|
8440
8459
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
8441
8460
|
pub on_cluster: Option<OnCluster>,
|
|
@@ -8478,6 +8497,7 @@ impl CreateView {
|
|
|
8478
8497
|
unique_key: None,
|
|
8479
8498
|
no_schema_binding: false,
|
|
8480
8499
|
auto_refresh: None,
|
|
8500
|
+
clickhouse_population: None,
|
|
8481
8501
|
on_cluster: None,
|
|
8482
8502
|
to_table: None,
|
|
8483
8503
|
table_properties: Vec::new(),
|