polyglot-sql 0.5.14__tar.gz → 0.5.15__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.5.14 → polyglot_sql-0.5.15}/Cargo.lock +5 -5
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/Cargo.toml +1 -1
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/PKG-INFO +1 -1
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/Cargo.toml +1 -1
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/fabric.rs +2 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/mod.rs +73 -12
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tsql.rs +137 -60
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/generator.rs +290 -8
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/transforms.rs +112 -35
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/known_failures.rs +7 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/test_runner.rs +6 -6
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +1 -1
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/fabric_regression.rs +7 -7
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue227_strict_unsupported.rs +116 -1
- polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue265_distinct_order_nulls.rs +92 -0
- polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue266_boolean_test_tsql.rs +106 -0
- polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue267_boolean_predicates_tsql_fabric.rs +96 -0
- polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue269_positional_order_by_tsql_fabric.rs +94 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/tsql_regression.rs +5 -5
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/README.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/README.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/ast_json.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/builder.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/bigquery.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/duckdb.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/expressions.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/guard.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/lib.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/lineage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/openlineage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/parser.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/query_analysis.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/scope.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/tokens.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/traversal.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/clickhouse_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/create_view_security_comment_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/data_type_api.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/deep_nesting_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/error_handling.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/fabric_tpch_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue201_regression_test.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue210_regression_test.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue226_regression_test.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/query_analysis.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/query_analysis_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/transform_regression.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/README.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/docs/index.md +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/openlineage.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/query_analysis.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/transforms.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_query_analysis.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_transforms.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/pyproject.toml +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/python/polyglot_sql/__init__.py +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/python/polyglot_sql/__init__.pyi +0 -0
- {polyglot_sql-0.5.14 → polyglot_sql-0.5.15}/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.5.
|
|
608
|
+
version = "0.5.15"
|
|
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.5.
|
|
624
|
+
version = "0.5.15"
|
|
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.5.
|
|
634
|
+
version = "0.5.15"
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
637
637
|
name = "polyglot-sql-python"
|
|
638
|
-
version = "0.5.
|
|
638
|
+
version = "0.5.15"
|
|
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.5.
|
|
649
|
+
version = "0.5.15"
|
|
650
650
|
dependencies = [
|
|
651
651
|
"console_error_panic_hook",
|
|
652
652
|
"js-sys",
|
|
@@ -106,7 +106,7 @@ thiserror = { workspace = true }
|
|
|
106
106
|
unicode-segmentation = { workspace = true }
|
|
107
107
|
stacker = { version = "0.1", optional = true }
|
|
108
108
|
ts-rs = { version = "12.0", features = ["serde-compat"], optional = true }
|
|
109
|
-
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.5.
|
|
109
|
+
polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.5.15", optional = true, default-features = false }
|
|
110
110
|
|
|
111
111
|
[dev-dependencies]
|
|
112
112
|
pretty_assertions = "1.4"
|
|
@@ -4185,6 +4185,7 @@ impl Dialect {
|
|
|
4185
4185
|
feature = "dialect-starrocks",
|
|
4186
4186
|
feature = "dialect-oracle",
|
|
4187
4187
|
feature = "dialect-clickhouse",
|
|
4188
|
+
feature = "dialect-fabric",
|
|
4188
4189
|
))]
|
|
4189
4190
|
use crate::transforms;
|
|
4190
4191
|
|
|
@@ -4258,6 +4259,16 @@ impl Dialect {
|
|
|
4258
4259
|
let expr = transforms::qualify_derived_table_outputs(expr)?;
|
|
4259
4260
|
Ok(expr)
|
|
4260
4261
|
}
|
|
4262
|
+
// Fabric shares T-SQL predicate rules: BIT values cannot be used as
|
|
4263
|
+
// bare conditions in WHERE/HAVING/ON/CASE WHEN contexts. Keep this
|
|
4264
|
+
// branch scoped to boolean coercion so Fabric-specific APPLY and
|
|
4265
|
+
// derived-table output behavior does not inherit unrelated T-SQL
|
|
4266
|
+
// preprocessing.
|
|
4267
|
+
#[cfg(feature = "dialect-fabric")]
|
|
4268
|
+
DialectType::Fabric => {
|
|
4269
|
+
let expr = transforms::ensure_bools(expr)?;
|
|
4270
|
+
Ok(expr)
|
|
4271
|
+
}
|
|
4261
4272
|
// Spark doesn't support QUALIFY (but Databricks does)
|
|
4262
4273
|
// Spark doesn't support CTEs in subqueries (hoist to top level)
|
|
4263
4274
|
#[cfg(feature = "dialect-spark")]
|
|
@@ -5003,6 +5014,15 @@ impl Dialect {
|
|
|
5003
5014
|
if Self::node_is_function_named(node, "TO_TSVECTOR") {
|
|
5004
5015
|
Self::push_unsupported_diagnostic(&mut diagnostics, "PostgreSQL TO_TSVECTOR");
|
|
5005
5016
|
}
|
|
5017
|
+
if matches!(target, DialectType::TSQL | DialectType::Fabric) {
|
|
5018
|
+
if let Some(function_name) = Self::postgres_tsql_unsupported_function_name(node)
|
|
5019
|
+
{
|
|
5020
|
+
Self::push_unsupported_diagnostic(
|
|
5021
|
+
&mut diagnostics,
|
|
5022
|
+
&format!("PostgreSQL {function_name}"),
|
|
5023
|
+
);
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5006
5026
|
if matches!(target, DialectType::TSQL | DialectType::Fabric)
|
|
5007
5027
|
&& Self::node_is_postgres_type_function_cast(node)
|
|
5008
5028
|
{
|
|
@@ -5183,6 +5203,46 @@ impl Dialect {
|
|
|
5183
5203
|
}
|
|
5184
5204
|
}
|
|
5185
5205
|
|
|
5206
|
+
fn postgres_tsql_unsupported_function_name(expr: &Expression) -> Option<&'static str> {
|
|
5207
|
+
match expr {
|
|
5208
|
+
Expression::Lpad(_) => Some("LPAD"),
|
|
5209
|
+
Expression::Rpad(_) => Some("RPAD"),
|
|
5210
|
+
Expression::SplitPart(_) => Some("SPLIT_PART"),
|
|
5211
|
+
Expression::Initcap(_) => Some("INITCAP"),
|
|
5212
|
+
Expression::ToJson(_) => Some("TO_JSON"),
|
|
5213
|
+
Expression::JSONBObjectAgg(_) => Some("JSONB_OBJECT_AGG"),
|
|
5214
|
+
Expression::Function(function) => {
|
|
5215
|
+
Self::postgres_tsql_unsupported_function_name_str(&function.name)
|
|
5216
|
+
}
|
|
5217
|
+
Expression::AggregateFunction(function) => {
|
|
5218
|
+
Self::postgres_tsql_unsupported_function_name_str(&function.name)
|
|
5219
|
+
}
|
|
5220
|
+
_ => None,
|
|
5221
|
+
}
|
|
5222
|
+
}
|
|
5223
|
+
|
|
5224
|
+
fn postgres_tsql_unsupported_function_name_str(name: &str) -> Option<&'static str> {
|
|
5225
|
+
if name.eq_ignore_ascii_case("LPAD") {
|
|
5226
|
+
Some("LPAD")
|
|
5227
|
+
} else if name.eq_ignore_ascii_case("RPAD") {
|
|
5228
|
+
Some("RPAD")
|
|
5229
|
+
} else if name.eq_ignore_ascii_case("SPLIT_PART") {
|
|
5230
|
+
Some("SPLIT_PART")
|
|
5231
|
+
} else if name.eq_ignore_ascii_case("INITCAP") {
|
|
5232
|
+
Some("INITCAP")
|
|
5233
|
+
} else if name.eq_ignore_ascii_case("TO_JSON") {
|
|
5234
|
+
Some("TO_JSON")
|
|
5235
|
+
} else if name.eq_ignore_ascii_case("TO_JSONB") {
|
|
5236
|
+
Some("TO_JSONB")
|
|
5237
|
+
} else if name.eq_ignore_ascii_case("JSONB_AGG") {
|
|
5238
|
+
Some("JSONB_AGG")
|
|
5239
|
+
} else if name.eq_ignore_ascii_case("JSONB_OBJECT_AGG") {
|
|
5240
|
+
Some("JSONB_OBJECT_AGG")
|
|
5241
|
+
} else {
|
|
5242
|
+
None
|
|
5243
|
+
}
|
|
5244
|
+
}
|
|
5245
|
+
|
|
5186
5246
|
fn normalize_postgres_type_function_casts(expr: Expression) -> Result<Expression> {
|
|
5187
5247
|
transform_recursive(expr, &|e| match e {
|
|
5188
5248
|
Expression::Function(function) => {
|
|
@@ -5689,21 +5749,22 @@ impl Dialect {
|
|
|
5689
5749
|
}
|
|
5690
5750
|
|
|
5691
5751
|
fn tsql_boolean_value_case(predicate: Expression) -> Expression {
|
|
5692
|
-
Expression::Case(Box::new(crate::expressions::Case {
|
|
5752
|
+
let case = Expression::Case(Box::new(crate::expressions::Case {
|
|
5693
5753
|
operand: None,
|
|
5694
|
-
whens: vec![
|
|
5695
|
-
|
|
5696
|
-
(
|
|
5697
|
-
Expression::Not(Box::new(crate::expressions::UnaryOp {
|
|
5698
|
-
this: predicate,
|
|
5699
|
-
inferred_type: None,
|
|
5700
|
-
})),
|
|
5701
|
-
Expression::number(0),
|
|
5702
|
-
),
|
|
5703
|
-
],
|
|
5704
|
-
else_: None,
|
|
5754
|
+
whens: vec![(predicate, Expression::number(1))],
|
|
5755
|
+
else_: Some(Expression::number(0)),
|
|
5705
5756
|
comments: Vec::new(),
|
|
5706
5757
|
inferred_type: None,
|
|
5758
|
+
}));
|
|
5759
|
+
|
|
5760
|
+
Expression::Cast(Box::new(Cast {
|
|
5761
|
+
this: case,
|
|
5762
|
+
to: DataType::Boolean,
|
|
5763
|
+
trailing_comments: Vec::new(),
|
|
5764
|
+
double_colon_syntax: false,
|
|
5765
|
+
format: None,
|
|
5766
|
+
default: None,
|
|
5767
|
+
inferred_type: None,
|
|
5707
5768
|
}))
|
|
5708
5769
|
}
|
|
5709
5770
|
|
|
@@ -194,66 +194,11 @@ impl DialectImpl for TSQLDialect {
|
|
|
194
194
|
// ===== Data Type Mappings =====
|
|
195
195
|
Expression::DataType(dt) => self.transform_data_type(dt),
|
|
196
196
|
|
|
197
|
-
// ===== Boolean IS TRUE/FALSE ->
|
|
198
|
-
//
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
)));
|
|
203
|
-
if it.not {
|
|
204
|
-
// a IS NOT TRUE -> NOT a = 1
|
|
205
|
-
Ok(Expression::Not(Box::new(crate::expressions::UnaryOp {
|
|
206
|
-
this: Expression::Eq(Box::new(crate::expressions::BinaryOp {
|
|
207
|
-
left: it.this,
|
|
208
|
-
right: one,
|
|
209
|
-
left_comments: vec![],
|
|
210
|
-
operator_comments: vec![],
|
|
211
|
-
trailing_comments: vec![],
|
|
212
|
-
inferred_type: None,
|
|
213
|
-
})),
|
|
214
|
-
inferred_type: None,
|
|
215
|
-
})))
|
|
216
|
-
} else {
|
|
217
|
-
// a IS TRUE -> a = 1
|
|
218
|
-
Ok(Expression::Eq(Box::new(crate::expressions::BinaryOp {
|
|
219
|
-
left: it.this,
|
|
220
|
-
right: one,
|
|
221
|
-
left_comments: vec![],
|
|
222
|
-
operator_comments: vec![],
|
|
223
|
-
trailing_comments: vec![],
|
|
224
|
-
inferred_type: None,
|
|
225
|
-
})))
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
Expression::IsFalse(it) => {
|
|
229
|
-
let zero = Expression::Literal(Box::new(crate::expressions::Literal::Number(
|
|
230
|
-
"0".to_string(),
|
|
231
|
-
)));
|
|
232
|
-
if it.not {
|
|
233
|
-
// a IS NOT FALSE -> NOT a = 0
|
|
234
|
-
Ok(Expression::Not(Box::new(crate::expressions::UnaryOp {
|
|
235
|
-
this: Expression::Eq(Box::new(crate::expressions::BinaryOp {
|
|
236
|
-
left: it.this,
|
|
237
|
-
right: zero,
|
|
238
|
-
left_comments: vec![],
|
|
239
|
-
operator_comments: vec![],
|
|
240
|
-
trailing_comments: vec![],
|
|
241
|
-
inferred_type: None,
|
|
242
|
-
})),
|
|
243
|
-
inferred_type: None,
|
|
244
|
-
})))
|
|
245
|
-
} else {
|
|
246
|
-
// a IS FALSE -> a = 0
|
|
247
|
-
Ok(Expression::Eq(Box::new(crate::expressions::BinaryOp {
|
|
248
|
-
left: it.this,
|
|
249
|
-
right: zero,
|
|
250
|
-
left_comments: vec![],
|
|
251
|
-
operator_comments: vec![],
|
|
252
|
-
trailing_comments: vec![],
|
|
253
|
-
inferred_type: None,
|
|
254
|
-
})))
|
|
255
|
-
}
|
|
256
|
-
}
|
|
197
|
+
// ===== Boolean IS TRUE/FALSE -> T-SQL 3VL truth table =====
|
|
198
|
+
// T-SQL doesn't have IS TRUE/IS FALSE syntax. Negated forms must
|
|
199
|
+
// explicitly preserve UNKNOWN/NULL rows instead of using NOT (x = n).
|
|
200
|
+
Expression::IsTrue(it) => Ok(Self::boolean_test_predicate(it.this, true, it.not)),
|
|
201
|
+
Expression::IsFalse(it) => Ok(Self::boolean_test_predicate(it.this, false, it.not)),
|
|
257
202
|
|
|
258
203
|
// Note: CASE WHEN boolean conditions are handled in ensure_bools preprocessing
|
|
259
204
|
|
|
@@ -684,6 +629,138 @@ impl DialectImpl for TSQLDialect {
|
|
|
684
629
|
|
|
685
630
|
#[cfg(feature = "transpile")]
|
|
686
631
|
impl TSQLDialect {
|
|
632
|
+
fn binary(
|
|
633
|
+
left: Expression,
|
|
634
|
+
right: Expression,
|
|
635
|
+
op: fn(Box<BinaryOp>) -> Expression,
|
|
636
|
+
) -> Expression {
|
|
637
|
+
op(Box::new(BinaryOp {
|
|
638
|
+
left,
|
|
639
|
+
right,
|
|
640
|
+
left_comments: Vec::new(),
|
|
641
|
+
operator_comments: Vec::new(),
|
|
642
|
+
trailing_comments: Vec::new(),
|
|
643
|
+
inferred_type: None,
|
|
644
|
+
}))
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
fn eq(left: Expression, right: Expression) -> Expression {
|
|
648
|
+
Self::binary(left, right, Expression::Eq)
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
fn or(left: Expression, right: Expression) -> Expression {
|
|
652
|
+
Self::binary(left, right, Expression::Or)
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
fn not(this: Expression) -> Expression {
|
|
656
|
+
Expression::Not(Box::new(crate::expressions::UnaryOp {
|
|
657
|
+
this,
|
|
658
|
+
inferred_type: None,
|
|
659
|
+
}))
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
fn is_null(this: Expression) -> Expression {
|
|
663
|
+
Expression::IsNull(Box::new(crate::expressions::IsNull {
|
|
664
|
+
this,
|
|
665
|
+
not: false,
|
|
666
|
+
postfix_form: false,
|
|
667
|
+
}))
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
fn boolean_test_case_for_predicate(
|
|
671
|
+
predicate: Expression,
|
|
672
|
+
test_true: bool,
|
|
673
|
+
negated: bool,
|
|
674
|
+
) -> Expression {
|
|
675
|
+
let condition = match (test_true, negated) {
|
|
676
|
+
(true, false) => predicate,
|
|
677
|
+
(false, false) => Self::not(predicate),
|
|
678
|
+
(true, true) => {
|
|
679
|
+
return Expression::Case(Box::new(crate::expressions::Case {
|
|
680
|
+
operand: None,
|
|
681
|
+
whens: vec![(predicate, Expression::number(0))],
|
|
682
|
+
else_: Some(Expression::number(1)),
|
|
683
|
+
comments: Vec::new(),
|
|
684
|
+
inferred_type: None,
|
|
685
|
+
}))
|
|
686
|
+
}
|
|
687
|
+
(false, true) => {
|
|
688
|
+
return Expression::Case(Box::new(crate::expressions::Case {
|
|
689
|
+
operand: None,
|
|
690
|
+
whens: vec![(Self::not(predicate), Expression::number(0))],
|
|
691
|
+
else_: Some(Expression::number(1)),
|
|
692
|
+
comments: Vec::new(),
|
|
693
|
+
inferred_type: None,
|
|
694
|
+
}))
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
Expression::Case(Box::new(crate::expressions::Case {
|
|
699
|
+
operand: None,
|
|
700
|
+
whens: vec![(condition, Expression::number(1))],
|
|
701
|
+
else_: Some(Expression::number(0)),
|
|
702
|
+
comments: Vec::new(),
|
|
703
|
+
inferred_type: None,
|
|
704
|
+
}))
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
fn boolean_test_predicate(operand: Expression, test_true: bool, negated: bool) -> Expression {
|
|
708
|
+
if Self::is_boolean_predicate_operand(&operand) {
|
|
709
|
+
return match (test_true, negated) {
|
|
710
|
+
(true, false) => operand,
|
|
711
|
+
(false, false) => Self::not(operand),
|
|
712
|
+
_ => Self::eq(
|
|
713
|
+
Self::boolean_test_case_for_predicate(operand, test_true, negated),
|
|
714
|
+
Expression::number(1),
|
|
715
|
+
),
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
match (test_true, negated) {
|
|
720
|
+
(true, false) => Self::eq(operand, Expression::number(1)),
|
|
721
|
+
(false, false) => Self::eq(operand, Expression::number(0)),
|
|
722
|
+
(true, true) => Self::or(
|
|
723
|
+
Self::eq(operand.clone(), Expression::number(0)),
|
|
724
|
+
Self::is_null(operand),
|
|
725
|
+
),
|
|
726
|
+
(false, true) => Self::or(
|
|
727
|
+
Self::eq(operand.clone(), Expression::number(1)),
|
|
728
|
+
Self::is_null(operand),
|
|
729
|
+
),
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
fn is_boolean_predicate_operand(expr: &Expression) -> bool {
|
|
734
|
+
match expr {
|
|
735
|
+
Expression::Paren(paren) => Self::is_boolean_predicate_operand(&paren.this),
|
|
736
|
+
Expression::Eq(_)
|
|
737
|
+
| Expression::Neq(_)
|
|
738
|
+
| Expression::Lt(_)
|
|
739
|
+
| Expression::Lte(_)
|
|
740
|
+
| Expression::Gt(_)
|
|
741
|
+
| Expression::Gte(_)
|
|
742
|
+
| Expression::Is(_)
|
|
743
|
+
| Expression::IsNull(_)
|
|
744
|
+
| Expression::IsTrue(_)
|
|
745
|
+
| Expression::IsFalse(_)
|
|
746
|
+
| Expression::Like(_)
|
|
747
|
+
| Expression::ILike(_)
|
|
748
|
+
| Expression::SimilarTo(_)
|
|
749
|
+
| Expression::Glob(_)
|
|
750
|
+
| Expression::RegexpLike(_)
|
|
751
|
+
| Expression::In(_)
|
|
752
|
+
| Expression::Between(_)
|
|
753
|
+
| Expression::Exists(_)
|
|
754
|
+
| Expression::And(_)
|
|
755
|
+
| Expression::Or(_)
|
|
756
|
+
| Expression::Not(_)
|
|
757
|
+
| Expression::Any(_)
|
|
758
|
+
| Expression::All(_)
|
|
759
|
+
| Expression::EqualNull(_) => true,
|
|
760
|
+
_ => false,
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
687
764
|
fn scalar_array_comparison_values(expr: &Expression) -> Option<Vec<Expression>> {
|
|
688
765
|
let (mut values, element_type) = Self::scalar_array_comparison_values_inner(expr)?;
|
|
689
766
|
if let Some(to) = element_type {
|