polyglot-sql 0.3.0__tar.gz → 0.3.1__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.0 → polyglot_sql-0.3.1}/Cargo.lock +5 -5
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/Cargo.toml +1 -1
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/PKG-INFO +1 -1
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/Cargo.toml +1 -1
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/builder.rs +2 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/mod.rs +70 -20
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/expressions.rs +11 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/generator.rs +45 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/lineage.rs +987 -7
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +44 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/parser.rs +472 -1
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/README.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/README.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/bigquery.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/duckdb.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/dialects/tsql.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/lib.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/scope.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/tokens.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/transforms.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/traversal.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/error_handling.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/README.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/docs/index.md +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/pyproject.toml +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/python/polyglot_sql/__init__.py +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/python/polyglot_sql/__init__.pyi +0 -0
- {polyglot_sql-0.3.0 → polyglot_sql-0.3.1}/python/polyglot_sql/py.typed +0 -0
|
@@ -587,7 +587,7 @@ dependencies = [
|
|
|
587
587
|
|
|
588
588
|
[[package]]
|
|
589
589
|
name = "polyglot-sql"
|
|
590
|
-
version = "0.3.
|
|
590
|
+
version = "0.3.1"
|
|
591
591
|
dependencies = [
|
|
592
592
|
"criterion",
|
|
593
593
|
"once_cell",
|
|
@@ -602,7 +602,7 @@ dependencies = [
|
|
|
602
602
|
|
|
603
603
|
[[package]]
|
|
604
604
|
name = "polyglot-sql-ffi"
|
|
605
|
-
version = "0.3.
|
|
605
|
+
version = "0.3.1"
|
|
606
606
|
dependencies = [
|
|
607
607
|
"cbindgen",
|
|
608
608
|
"polyglot-sql",
|
|
@@ -612,11 +612,11 @@ dependencies = [
|
|
|
612
612
|
|
|
613
613
|
[[package]]
|
|
614
614
|
name = "polyglot-sql-function-catalogs"
|
|
615
|
-
version = "0.3.
|
|
615
|
+
version = "0.3.1"
|
|
616
616
|
|
|
617
617
|
[[package]]
|
|
618
618
|
name = "polyglot-sql-python"
|
|
619
|
-
version = "0.3.
|
|
619
|
+
version = "0.3.1"
|
|
620
620
|
dependencies = [
|
|
621
621
|
"polyglot-sql",
|
|
622
622
|
"pyo3",
|
|
@@ -627,7 +627,7 @@ dependencies = [
|
|
|
627
627
|
|
|
628
628
|
[[package]]
|
|
629
629
|
name = "polyglot-sql-wasm"
|
|
630
|
-
version = "0.3.
|
|
630
|
+
version = "0.3.1"
|
|
631
631
|
dependencies = [
|
|
632
632
|
"console_error_panic_hook",
|
|
633
633
|
"js-sys",
|
|
@@ -78,7 +78,7 @@ serde_json = { workspace = true }
|
|
|
78
78
|
thiserror = { workspace = true }
|
|
79
79
|
unicode-segmentation = { workspace = true }
|
|
80
80
|
ts-rs = { version = "12.0", features = ["serde-compat"], optional = true }
|
|
81
|
-
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.3.
|
|
81
|
+
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.3.1", optional = true, default-features = false }
|
|
82
82
|
|
|
83
83
|
[dev-dependencies]
|
|
84
84
|
pretty_assertions = "1.4"
|
|
@@ -543,6 +543,33 @@ where
|
|
|
543
543
|
{
|
|
544
544
|
use crate::expressions::BinaryOp;
|
|
545
545
|
|
|
546
|
+
// Helper macro to recurse into AggFunc-based expressions (this, filter, order_by, having_max, limit).
|
|
547
|
+
macro_rules! recurse_agg {
|
|
548
|
+
($variant:ident, $f:expr) => {{
|
|
549
|
+
let mut f = $f;
|
|
550
|
+
f.this = transform_recursive(f.this, transform_fn)?;
|
|
551
|
+
if let Some(filter) = f.filter.take() {
|
|
552
|
+
f.filter = Some(transform_recursive(filter, transform_fn)?);
|
|
553
|
+
}
|
|
554
|
+
for ord in &mut f.order_by {
|
|
555
|
+
ord.this = transform_recursive(
|
|
556
|
+
std::mem::replace(&mut ord.this, Expression::Null(crate::expressions::Null)),
|
|
557
|
+
transform_fn,
|
|
558
|
+
)?;
|
|
559
|
+
}
|
|
560
|
+
if let Some((ref mut expr, _)) = f.having_max {
|
|
561
|
+
*expr = Box::new(transform_recursive(
|
|
562
|
+
std::mem::replace(expr.as_mut(), Expression::Null(crate::expressions::Null)),
|
|
563
|
+
transform_fn,
|
|
564
|
+
)?);
|
|
565
|
+
}
|
|
566
|
+
if let Some(limit) = f.limit.take() {
|
|
567
|
+
f.limit = Some(Box::new(transform_recursive(*limit, transform_fn)?));
|
|
568
|
+
}
|
|
569
|
+
Expression::$variant(f)
|
|
570
|
+
}};
|
|
571
|
+
}
|
|
572
|
+
|
|
546
573
|
// Helper macro to transform binary ops with Box<BinaryOp>
|
|
547
574
|
macro_rules! transform_binary {
|
|
548
575
|
($variant:ident, $op:expr) => {{
|
|
@@ -954,14 +981,9 @@ where
|
|
|
954
981
|
f.this = transform_recursive(f.this, transform_fn)?;
|
|
955
982
|
Expression::Date(f)
|
|
956
983
|
}
|
|
957
|
-
Expression::Stddev(
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
}
|
|
961
|
-
Expression::Variance(mut f) => {
|
|
962
|
-
f.this = transform_recursive(f.this, transform_fn)?;
|
|
963
|
-
Expression::Variance(f)
|
|
964
|
-
}
|
|
984
|
+
Expression::Stddev(f) => recurse_agg!(Stddev, f),
|
|
985
|
+
Expression::StddevSamp(f) => recurse_agg!(StddevSamp, f),
|
|
986
|
+
Expression::Variance(f) => recurse_agg!(Variance, f),
|
|
965
987
|
|
|
966
988
|
// ===== BinaryFunc-based expressions =====
|
|
967
989
|
Expression::ModFunc(mut f) => {
|
|
@@ -1586,19 +1608,45 @@ where
|
|
|
1586
1608
|
Expression::Filter(f)
|
|
1587
1609
|
}
|
|
1588
1610
|
|
|
1589
|
-
//
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
Expression::
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
Expression::
|
|
1599
|
-
|
|
1600
|
-
|
|
1611
|
+
// Aggregate functions (AggFunc-based): recurse into the aggregate argument,
|
|
1612
|
+
// filter, order_by, having_max, and limit.
|
|
1613
|
+
// Stddev, StddevSamp, Variance, and ArrayAgg are handled earlier in this match.
|
|
1614
|
+
Expression::Sum(f) => recurse_agg!(Sum, f),
|
|
1615
|
+
Expression::Avg(f) => recurse_agg!(Avg, f),
|
|
1616
|
+
Expression::Min(f) => recurse_agg!(Min, f),
|
|
1617
|
+
Expression::Max(f) => recurse_agg!(Max, f),
|
|
1618
|
+
Expression::CountIf(f) => recurse_agg!(CountIf, f),
|
|
1619
|
+
Expression::StddevPop(f) => recurse_agg!(StddevPop, f),
|
|
1620
|
+
Expression::VarPop(f) => recurse_agg!(VarPop, f),
|
|
1621
|
+
Expression::VarSamp(f) => recurse_agg!(VarSamp, f),
|
|
1622
|
+
Expression::Median(f) => recurse_agg!(Median, f),
|
|
1623
|
+
Expression::Mode(f) => recurse_agg!(Mode, f),
|
|
1624
|
+
Expression::First(f) => recurse_agg!(First, f),
|
|
1625
|
+
Expression::Last(f) => recurse_agg!(Last, f),
|
|
1626
|
+
Expression::AnyValue(f) => recurse_agg!(AnyValue, f),
|
|
1627
|
+
Expression::ApproxDistinct(f) => recurse_agg!(ApproxDistinct, f),
|
|
1628
|
+
Expression::ApproxCountDistinct(f) => recurse_agg!(ApproxCountDistinct, f),
|
|
1629
|
+
Expression::LogicalAnd(f) => recurse_agg!(LogicalAnd, f),
|
|
1630
|
+
Expression::LogicalOr(f) => recurse_agg!(LogicalOr, f),
|
|
1631
|
+
Expression::Skewness(f) => recurse_agg!(Skewness, f),
|
|
1632
|
+
Expression::ArrayConcatAgg(f) => recurse_agg!(ArrayConcatAgg, f),
|
|
1633
|
+
Expression::ArrayUniqueAgg(f) => recurse_agg!(ArrayUniqueAgg, f),
|
|
1634
|
+
Expression::BoolXorAgg(f) => recurse_agg!(BoolXorAgg, f),
|
|
1635
|
+
Expression::BitwiseOrAgg(f) => recurse_agg!(BitwiseOrAgg, f),
|
|
1636
|
+
Expression::BitwiseAndAgg(f) => recurse_agg!(BitwiseAndAgg, f),
|
|
1637
|
+
Expression::BitwiseXorAgg(f) => recurse_agg!(BitwiseXorAgg, f),
|
|
1638
|
+
|
|
1639
|
+
// Count has its own struct with an Option<Expression> `this` field
|
|
1640
|
+
Expression::Count(mut c) => {
|
|
1641
|
+
if let Some(this) = c.this.take() {
|
|
1642
|
+
c.this = Some(transform_recursive(this, transform_fn)?);
|
|
1643
|
+
}
|
|
1644
|
+
if let Some(filter) = c.filter.take() {
|
|
1645
|
+
c.filter = Some(transform_recursive(filter, transform_fn)?);
|
|
1646
|
+
}
|
|
1647
|
+
Expression::Count(c)
|
|
1601
1648
|
}
|
|
1649
|
+
|
|
1602
1650
|
Expression::PipeOperator(mut pipe) => {
|
|
1603
1651
|
pipe.this = transform_recursive(pipe.this, transform_fn)?;
|
|
1604
1652
|
pipe.expression = transform_recursive(pipe.expression, transform_fn)?;
|
|
@@ -29880,6 +29928,8 @@ impl Dialect {
|
|
|
29880
29928
|
using_template: None,
|
|
29881
29929
|
rollup: None,
|
|
29882
29930
|
uuid: None,
|
|
29931
|
+
with_partition_columns: Vec::new(),
|
|
29932
|
+
with_connection: None,
|
|
29883
29933
|
};
|
|
29884
29934
|
return Expression::CreateTable(Box::new(ct));
|
|
29885
29935
|
}
|
|
@@ -7344,6 +7344,15 @@ pub struct CreateTable {
|
|
|
7344
7344
|
/// ClickHouse: UUID 'xxx' clause after table name
|
|
7345
7345
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
7346
7346
|
pub uuid: Option<String>,
|
|
7347
|
+
/// WITH PARTITION COLUMNS (col_name col_type, ...) — currently used by BigQuery
|
|
7348
|
+
/// for hive-partitioned external tables. Not dialect-prefixed since the syntax
|
|
7349
|
+
/// could appear in other engines.
|
|
7350
|
+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
|
7351
|
+
pub with_partition_columns: Vec<ColumnDef>,
|
|
7352
|
+
/// WITH CONNECTION `project.region.connection` — currently used by BigQuery
|
|
7353
|
+
/// for external tables that reference a Cloud Resource connection.
|
|
7354
|
+
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
7355
|
+
pub with_connection: Option<TableRef>,
|
|
7347
7356
|
}
|
|
7348
7357
|
|
|
7349
7358
|
/// Teradata index specification for CREATE TABLE
|
|
@@ -7411,6 +7420,8 @@ impl CreateTable {
|
|
|
7411
7420
|
using_template: None,
|
|
7412
7421
|
rollup: None,
|
|
7413
7422
|
uuid: None,
|
|
7423
|
+
with_partition_columns: Vec::new(),
|
|
7424
|
+
with_connection: None,
|
|
7414
7425
|
}
|
|
7415
7426
|
}
|
|
7416
7427
|
}
|
|
@@ -7947,6 +7947,51 @@ impl Generator {
|
|
|
7947
7947
|
self.generate_expression(&on_prop.this)?;
|
|
7948
7948
|
}
|
|
7949
7949
|
|
|
7950
|
+
// BigQuery: WITH PARTITION COLUMNS (col_name col_type, ...)
|
|
7951
|
+
if !ct.with_partition_columns.is_empty() {
|
|
7952
|
+
if self.config.pretty {
|
|
7953
|
+
self.write_newline();
|
|
7954
|
+
} else {
|
|
7955
|
+
self.write_space();
|
|
7956
|
+
}
|
|
7957
|
+
self.write_keyword("WITH PARTITION COLUMNS");
|
|
7958
|
+
self.write(" (");
|
|
7959
|
+
if self.config.pretty {
|
|
7960
|
+
self.write_newline();
|
|
7961
|
+
self.indent_level += 1;
|
|
7962
|
+
for (i, col) in ct.with_partition_columns.iter().enumerate() {
|
|
7963
|
+
if i > 0 {
|
|
7964
|
+
self.write(",");
|
|
7965
|
+
self.write_newline();
|
|
7966
|
+
}
|
|
7967
|
+
self.write_indent();
|
|
7968
|
+
self.generate_column_def(col)?;
|
|
7969
|
+
}
|
|
7970
|
+
self.indent_level -= 1;
|
|
7971
|
+
self.write_newline();
|
|
7972
|
+
} else {
|
|
7973
|
+
for (i, col) in ct.with_partition_columns.iter().enumerate() {
|
|
7974
|
+
if i > 0 {
|
|
7975
|
+
self.write(", ");
|
|
7976
|
+
}
|
|
7977
|
+
self.generate_column_def(col)?;
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
self.write(")");
|
|
7981
|
+
}
|
|
7982
|
+
|
|
7983
|
+
// BigQuery: WITH CONNECTION `project.region.connection`
|
|
7984
|
+
if let Some(ref conn) = ct.with_connection {
|
|
7985
|
+
if self.config.pretty {
|
|
7986
|
+
self.write_newline();
|
|
7987
|
+
} else {
|
|
7988
|
+
self.write_space();
|
|
7989
|
+
}
|
|
7990
|
+
self.write_keyword("WITH CONNECTION");
|
|
7991
|
+
self.write_space();
|
|
7992
|
+
self.generate_table(conn)?;
|
|
7993
|
+
}
|
|
7994
|
+
|
|
7950
7995
|
// Output SchemaCommentProperty BEFORE WITH properties (Presto/Hive/Spark style)
|
|
7951
7996
|
// For ClickHouse, SchemaCommentProperty goes after AS SELECT, handled later
|
|
7952
7997
|
if !is_clickhouse {
|