polyglot-sql 0.3.1__tar.gz → 0.3.3__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.1 → polyglot_sql-0.3.3}/Cargo.lock +47 -5
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/Cargo.toml +1 -1
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/PKG-INFO +1 -1
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/Cargo.toml +7 -2
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/ast_transforms.rs +16 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/builder.rs +2 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/bigquery.rs +1 -3
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/doris.rs +51 -1
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/duckdb.rs +3 -3
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/mod.rs +1523 -140
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/sqlite.rs +9 -3
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/starrocks.rs +52 -1
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/tsql.rs +9 -15
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/expressions.rs +48 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/generator.rs +308 -28
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/lib.rs +42 -11
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/lineage.rs +87 -96
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/parser.rs +2311 -1447
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/transforms.rs +10 -3
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/traversal.rs +8 -0
- polyglot_sql-0.3.3/crates/polyglot-sql/tests/clickhouse_regression.rs +29 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +90 -62
- polyglot_sql-0.3.3/crates/polyglot-sql/tests/deep_nesting_regression.rs +265 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/dialect_matrix.rs +22 -29
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/error_handling.rs +15 -39
- polyglot_sql-0.3.3/crates/polyglot-sql/tests/snowflake_regression_test.rs +329 -0
- polyglot_sql-0.3.3/crates/polyglot-sql/tests/tpch_transpile_stack.rs +109 -0
- polyglot_sql-0.3.3/crates/polyglot-sql/tests/transform_regression.rs +200 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/README.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/README.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/scope.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/tokens.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/README.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/docs/index.md +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/pyproject.toml +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/python/polyglot_sql/__init__.py +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/python/polyglot_sql/__init__.pyi +0 -0
- {polyglot_sql-0.3.1 → polyglot_sql-0.3.3}/python/polyglot_sql/py.typed +0 -0
|
@@ -73,6 +73,15 @@ version = "1.0.102"
|
|
|
73
73
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
74
|
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
|
75
75
|
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "ar_archive_writer"
|
|
78
|
+
version = "0.5.1"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b"
|
|
81
|
+
dependencies = [
|
|
82
|
+
"object",
|
|
83
|
+
]
|
|
84
|
+
|
|
76
85
|
[[package]]
|
|
77
86
|
name = "async-trait"
|
|
78
87
|
version = "0.1.89"
|
|
@@ -527,6 +536,15 @@ dependencies = [
|
|
|
527
536
|
"libm",
|
|
528
537
|
]
|
|
529
538
|
|
|
539
|
+
[[package]]
|
|
540
|
+
name = "object"
|
|
541
|
+
version = "0.37.3"
|
|
542
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
543
|
+
checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
|
|
544
|
+
dependencies = [
|
|
545
|
+
"memchr",
|
|
546
|
+
]
|
|
547
|
+
|
|
530
548
|
[[package]]
|
|
531
549
|
name = "once_cell"
|
|
532
550
|
version = "1.21.3"
|
|
@@ -587,7 +605,7 @@ dependencies = [
|
|
|
587
605
|
|
|
588
606
|
[[package]]
|
|
589
607
|
name = "polyglot-sql"
|
|
590
|
-
version = "0.3.
|
|
608
|
+
version = "0.3.3"
|
|
591
609
|
dependencies = [
|
|
592
610
|
"criterion",
|
|
593
611
|
"once_cell",
|
|
@@ -595,6 +613,7 @@ dependencies = [
|
|
|
595
613
|
"pretty_assertions",
|
|
596
614
|
"serde",
|
|
597
615
|
"serde_json",
|
|
616
|
+
"stacker",
|
|
598
617
|
"thiserror 1.0.69",
|
|
599
618
|
"ts-rs",
|
|
600
619
|
"unicode-segmentation",
|
|
@@ -602,7 +621,7 @@ dependencies = [
|
|
|
602
621
|
|
|
603
622
|
[[package]]
|
|
604
623
|
name = "polyglot-sql-ffi"
|
|
605
|
-
version = "0.3.
|
|
624
|
+
version = "0.3.3"
|
|
606
625
|
dependencies = [
|
|
607
626
|
"cbindgen",
|
|
608
627
|
"polyglot-sql",
|
|
@@ -612,11 +631,11 @@ dependencies = [
|
|
|
612
631
|
|
|
613
632
|
[[package]]
|
|
614
633
|
name = "polyglot-sql-function-catalogs"
|
|
615
|
-
version = "0.3.
|
|
634
|
+
version = "0.3.3"
|
|
616
635
|
|
|
617
636
|
[[package]]
|
|
618
637
|
name = "polyglot-sql-python"
|
|
619
|
-
version = "0.3.
|
|
638
|
+
version = "0.3.3"
|
|
620
639
|
dependencies = [
|
|
621
640
|
"polyglot-sql",
|
|
622
641
|
"pyo3",
|
|
@@ -627,7 +646,7 @@ dependencies = [
|
|
|
627
646
|
|
|
628
647
|
[[package]]
|
|
629
648
|
name = "polyglot-sql-wasm"
|
|
630
|
-
version = "0.3.
|
|
649
|
+
version = "0.3.3"
|
|
631
650
|
dependencies = [
|
|
632
651
|
"console_error_panic_hook",
|
|
633
652
|
"js-sys",
|
|
@@ -674,6 +693,16 @@ dependencies = [
|
|
|
674
693
|
"unicode-ident",
|
|
675
694
|
]
|
|
676
695
|
|
|
696
|
+
[[package]]
|
|
697
|
+
name = "psm"
|
|
698
|
+
version = "0.1.31"
|
|
699
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
700
|
+
checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea"
|
|
701
|
+
dependencies = [
|
|
702
|
+
"ar_archive_writer",
|
|
703
|
+
"cc",
|
|
704
|
+
]
|
|
705
|
+
|
|
677
706
|
[[package]]
|
|
678
707
|
name = "pyo3"
|
|
679
708
|
version = "0.28.2"
|
|
@@ -915,6 +944,19 @@ version = "0.4.11"
|
|
|
915
944
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
916
945
|
checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
|
|
917
946
|
|
|
947
|
+
[[package]]
|
|
948
|
+
name = "stacker"
|
|
949
|
+
version = "0.1.24"
|
|
950
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
951
|
+
checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190"
|
|
952
|
+
dependencies = [
|
|
953
|
+
"cc",
|
|
954
|
+
"cfg-if",
|
|
955
|
+
"libc",
|
|
956
|
+
"psm",
|
|
957
|
+
"windows-sys",
|
|
958
|
+
]
|
|
959
|
+
|
|
918
960
|
[[package]]
|
|
919
961
|
name = "strsim"
|
|
920
962
|
version = "0.11.1"
|
|
@@ -10,9 +10,13 @@ description = "SQL parsing, validating, formatting, and dialect translation libr
|
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
|
|
12
12
|
[features]
|
|
13
|
-
default = ["all-dialects", "transpile"]
|
|
13
|
+
default = ["all-dialects", "transpile", "stacker"]
|
|
14
14
|
bindings = ["dep:ts-rs"]
|
|
15
15
|
transpile = []
|
|
16
|
+
# Default-on for native builds so direct Rust users and the FFI/Python bindings
|
|
17
|
+
# inherit stack-growth protection automatically. WASM opts out via
|
|
18
|
+
# `default-features = false` in its dependency declaration.
|
|
19
|
+
stacker = ["dep:stacker"]
|
|
16
20
|
all-dialects = [
|
|
17
21
|
"dialect-postgresql", "dialect-mysql", "dialect-bigquery",
|
|
18
22
|
"dialect-snowflake", "dialect-duckdb", "dialect-tsql",
|
|
@@ -77,8 +81,9 @@ serde = { workspace = true }
|
|
|
77
81
|
serde_json = { workspace = true }
|
|
78
82
|
thiserror = { workspace = true }
|
|
79
83
|
unicode-segmentation = { workspace = true }
|
|
84
|
+
stacker = { version = "0.1", optional = true }
|
|
80
85
|
ts-rs = { version = "12.0", features = ["serde-compat"], optional = true }
|
|
81
|
-
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.3", optional = true, default-features = false }
|
|
82
87
|
|
|
83
88
|
[dev-dependencies]
|
|
84
89
|
pretty_assertions = "1.4"
|
|
@@ -422,6 +422,22 @@ pub fn get_table_names(expr: &Expression) -> Vec<String> {
|
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
+
Expression::Cache(cache) => {
|
|
426
|
+
let name = cache.table.name.clone();
|
|
427
|
+
if !name.is_empty() && !cte_aliases.contains(&name) {
|
|
428
|
+
names.push(name);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
Expression::Uncache(uncache) => {
|
|
432
|
+
let name = uncache.table.name.clone();
|
|
433
|
+
if !name.is_empty() && !cte_aliases.contains(&name) {
|
|
434
|
+
names.push(name);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
Expression::CreateSynonym(synonym) => {
|
|
438
|
+
push_table_ref_name(&synonym.name, &cte_aliases, &mut names);
|
|
439
|
+
push_table_ref_name(&synonym.target, &cte_aliases, &mut names);
|
|
440
|
+
}
|
|
425
441
|
_ => {}
|
|
426
442
|
}
|
|
427
443
|
}
|
|
@@ -803,6 +803,7 @@ pub fn delete(table_name: &str) -> DeleteBuilder {
|
|
|
803
803
|
DeleteBuilder {
|
|
804
804
|
delete: Delete {
|
|
805
805
|
table: builder_table_ref(table_name),
|
|
806
|
+
hint: None,
|
|
806
807
|
on_cluster: None,
|
|
807
808
|
alias: None,
|
|
808
809
|
alias_explicit_as: false,
|
|
@@ -894,6 +895,7 @@ pub fn update(table_name: &str) -> UpdateBuilder {
|
|
|
894
895
|
UpdateBuilder {
|
|
895
896
|
update: Update {
|
|
896
897
|
table: builder_table_ref(table_name),
|
|
898
|
+
hint: None,
|
|
897
899
|
extra_tables: Vec::new(),
|
|
898
900
|
table_joins: Vec::new(),
|
|
899
901
|
set: Vec::new(),
|
|
@@ -1142,9 +1142,7 @@ impl BigQueryDialect {
|
|
|
1142
1142
|
let unit_name = match &unit_expr {
|
|
1143
1143
|
Expression::Identifier(id) => id.name.to_uppercase(),
|
|
1144
1144
|
Expression::Var(v) => v.this.to_uppercase(),
|
|
1145
|
-
Expression::Column(col) if col.table.is_none() =>
|
|
1146
|
-
col.name.name.to_uppercase()
|
|
1147
|
-
}
|
|
1145
|
+
Expression::Column(col) if col.table.is_none() => col.name.name.to_uppercase(),
|
|
1148
1146
|
_ => "DAY".to_string(),
|
|
1149
1147
|
};
|
|
1150
1148
|
let unit = match unit_name.as_str() {
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
use super::{DialectImpl, DialectType};
|
|
7
7
|
use crate::error::Result;
|
|
8
|
-
use crate::expressions::{
|
|
8
|
+
use crate::expressions::{
|
|
9
|
+
AggFunc, Case, Cast, Expression, Function, Interval, IntervalUnit, IntervalUnitSpec, VarArgFunc,
|
|
10
|
+
};
|
|
9
11
|
use crate::generator::GeneratorConfig;
|
|
10
12
|
use crate::tokens::TokenizerConfig;
|
|
11
13
|
|
|
@@ -106,6 +108,16 @@ impl DialectImpl for DorisDialect {
|
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
impl DorisDialect {
|
|
111
|
+
fn wrap_day_interval(expr: Expression) -> Expression {
|
|
112
|
+
Expression::Interval(Box::new(Interval {
|
|
113
|
+
this: Some(expr),
|
|
114
|
+
unit: Some(IntervalUnitSpec::Simple {
|
|
115
|
+
unit: IntervalUnit::Day,
|
|
116
|
+
use_plural: false,
|
|
117
|
+
}),
|
|
118
|
+
}))
|
|
119
|
+
}
|
|
120
|
+
|
|
109
121
|
fn transform_function(&self, f: Function) -> Result<Expression> {
|
|
110
122
|
let name_upper = f.name.to_uppercase();
|
|
111
123
|
match name_upper.as_str() {
|
|
@@ -207,6 +219,44 @@ impl DorisDialect {
|
|
|
207
219
|
// DATE_TRUNC is native in Doris
|
|
208
220
|
"DATE_TRUNC" => Ok(Expression::Function(Box::new(f))),
|
|
209
221
|
|
|
222
|
+
// Doris normalizes MySQL-style day shorthand to INTERVAL syntax.
|
|
223
|
+
"DATE_ADD" if f.args.len() == 2 && !matches!(f.args[1], Expression::Interval(_)) => {
|
|
224
|
+
let mut args = f.args;
|
|
225
|
+
let date = args.remove(0);
|
|
226
|
+
let days = args.remove(0);
|
|
227
|
+
Ok(Expression::Function(Box::new(Function::new(
|
|
228
|
+
"DATE_ADD".to_string(),
|
|
229
|
+
vec![date, Self::wrap_day_interval(days)],
|
|
230
|
+
))))
|
|
231
|
+
}
|
|
232
|
+
"DATE_SUB" if f.args.len() == 2 && !matches!(f.args[1], Expression::Interval(_)) => {
|
|
233
|
+
let mut args = f.args;
|
|
234
|
+
let date = args.remove(0);
|
|
235
|
+
let days = args.remove(0);
|
|
236
|
+
Ok(Expression::Function(Box::new(Function::new(
|
|
237
|
+
"DATE_SUB".to_string(),
|
|
238
|
+
vec![date, Self::wrap_day_interval(days)],
|
|
239
|
+
))))
|
|
240
|
+
}
|
|
241
|
+
"ADDDATE" if f.args.len() == 2 && !matches!(f.args[1], Expression::Interval(_)) => {
|
|
242
|
+
let mut args = f.args;
|
|
243
|
+
let date = args.remove(0);
|
|
244
|
+
let days = args.remove(0);
|
|
245
|
+
Ok(Expression::Function(Box::new(Function::new(
|
|
246
|
+
"DATE_ADD".to_string(),
|
|
247
|
+
vec![date, Self::wrap_day_interval(days)],
|
|
248
|
+
))))
|
|
249
|
+
}
|
|
250
|
+
"SUBDATE" if f.args.len() == 2 && !matches!(f.args[1], Expression::Interval(_)) => {
|
|
251
|
+
let mut args = f.args;
|
|
252
|
+
let date = args.remove(0);
|
|
253
|
+
let days = args.remove(0);
|
|
254
|
+
Ok(Expression::Function(Box::new(Function::new(
|
|
255
|
+
"DATE_SUB".to_string(),
|
|
256
|
+
vec![date, Self::wrap_day_interval(days)],
|
|
257
|
+
))))
|
|
258
|
+
}
|
|
259
|
+
|
|
210
260
|
// COLLECT_LIST is native in Doris
|
|
211
261
|
"COLLECT_LIST" => Ok(Expression::Function(Box::new(f))),
|
|
212
262
|
|
|
@@ -13,9 +13,9 @@ use super::{DialectImpl, DialectType};
|
|
|
13
13
|
use crate::error::Result;
|
|
14
14
|
use crate::expressions::{
|
|
15
15
|
AggFunc, Alias, BinaryOp, Case, Cast, CeilFunc, Column, DataType, Expression, Function,
|
|
16
|
-
Identifier, Interval, IntervalUnit, IntervalUnitSpec, IsNull, JSONPath,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
Identifier, Interval, IntervalUnit, IntervalUnitSpec, IsNull, JSONPath, JSONPathKey,
|
|
17
|
+
JSONPathRoot, JSONPathSubscript, JsonExtractFunc, Literal, Null, Paren, Struct, Subquery,
|
|
18
|
+
SubstringFunc, UnaryFunc, UnaryOp, VarArgFunc, WindowFunction,
|
|
19
19
|
};
|
|
20
20
|
use crate::generator::GeneratorConfig;
|
|
21
21
|
use crate::tokens::TokenizerConfig;
|