polyglot-sql 0.5.2__tar.gz → 0.5.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.5.2 → polyglot_sql-0.5.3}/Cargo.lock +5 -5
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/Cargo.toml +1 -1
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/PKG-INFO +43 -6
- {polyglot_sql-0.5.2/crates/polyglot-sql-python → polyglot_sql-0.5.3}/README.md +42 -5
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/Cargo.toml +1 -1
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/README.md +47 -6
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/generator.rs +19 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/lib.rs +3 -3
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/parser.rs +28 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/query_analysis.rs +469 -22
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/query_analysis.rs +183 -8
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/tsql_regression.rs +47 -1
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3/crates/polyglot-sql-python}/README.md +42 -5
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/docs/index.md +41 -4
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_query_analysis.py +28 -2
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/python/polyglot_sql/__init__.pyi +6 -1
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/benches/in_list.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/benches/parsing.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/benches/transpile.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/examples/bench_json.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/builder.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/bigquery.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/duckdb.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/mod.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/dialects/tsql.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/diff.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/error.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/expressions.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/function_catalog.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/function_registry.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/helper.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/lineage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/openlineage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/planner.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/resolver.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/schema.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/scope.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/time.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/tokens.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/transforms.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/traversal.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/trie.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/validation/tests.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/src/validation.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/clickhouse_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/common/mod.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/data_type_api.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/deep_nesting_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/error_handling.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/fabric_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/fabric_tpch_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/issue201_regression_test.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/issue210_regression_test.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/issue226_regression_test.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/issue227_strict_unsupported.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql/tests/transform_regression.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/README.md +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/Cargo.toml +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/docs/api.md +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/mkdocs.yml +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/dialects.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/diff.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/errors.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/expr.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/format.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/generate.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/helpers.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/lib.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/lineage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/openlineage.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/optimize.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/parse.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/query_analysis.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/transforms.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/transpile.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/types.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/src/validate.rs +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/conftest.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_format.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_transforms.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/crates/polyglot-sql-python/uv.lock +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/pyproject.toml +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/python/polyglot_sql/__init__.py +0 -0
- {polyglot_sql-0.5.2 → polyglot_sql-0.5.3}/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.3"
|
|
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.3"
|
|
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.3"
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
637
637
|
name = "polyglot-sql-python"
|
|
638
|
-
version = "0.5.
|
|
638
|
+
version = "0.5.3"
|
|
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.3"
|
|
650
650
|
dependencies = [
|
|
651
651
|
"console_error_panic_hook",
|
|
652
652
|
"js-sys",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyglot-sql
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -125,21 +125,25 @@ emission are intentionally out of scope.
|
|
|
125
125
|
|
|
126
126
|
```python
|
|
127
127
|
analysis = polyglot_sql.analyze_query(
|
|
128
|
-
"
|
|
128
|
+
"WITH base AS (SELECT id, amount FROM orders) SELECT * FROM base",
|
|
129
129
|
{
|
|
130
130
|
"dialect": "generic",
|
|
131
131
|
"schema": {
|
|
132
132
|
"tables": [
|
|
133
133
|
{
|
|
134
134
|
"name": "orders",
|
|
135
|
-
"columns": [
|
|
135
|
+
"columns": [
|
|
136
|
+
{"name": "id", "type": "INT", "nullable": False},
|
|
137
|
+
{"name": "amount", "type": "DECIMAL(10,2)", "nullable": True},
|
|
138
|
+
],
|
|
136
139
|
}
|
|
137
140
|
]
|
|
138
141
|
},
|
|
139
142
|
},
|
|
140
143
|
)
|
|
141
|
-
print(analysis["
|
|
142
|
-
print(analysis["
|
|
144
|
+
print(analysis["cteFacts"][0]["bodySql"]) # "SELECT id, amount FROM orders"
|
|
145
|
+
print(analysis["starProjections"][0]["expandedColumns"]) # ["id", "amount"]
|
|
146
|
+
print(analysis["projections"][0]["nullability"]) # "non_null"
|
|
143
147
|
print(analysis["baseTables"][0]["name"]) # "orders"
|
|
144
148
|
```
|
|
145
149
|
|
|
@@ -147,7 +151,40 @@ print(analysis["baseTables"][0]["name"]) # "orders"
|
|
|
147
151
|
`analysis["baseTables"]` reports deduplicated physical table dependencies across
|
|
148
152
|
nested CTEs, derived tables, subqueries, and set-operation branches. Validation
|
|
149
153
|
uses broad type families, while query analysis preserves parseable detailed
|
|
150
|
-
schema type strings for projection `typeHint` values.
|
|
154
|
+
schema type strings for projection `typeHint` values. `analysis["cteFacts"]`
|
|
155
|
+
reports top-level CTE definitions, `analysis["starProjections"]` records the
|
|
156
|
+
original star projections and schema-expanded columns, and each projection has
|
|
157
|
+
conservative `nullability`: `"non_null"`, `"nullable"`, or `"unknown"`.
|
|
158
|
+
|
|
159
|
+
Validation schema dictionaries use:
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
schema = {
|
|
163
|
+
"strict": True,
|
|
164
|
+
"tables": [
|
|
165
|
+
{
|
|
166
|
+
"name": "orders",
|
|
167
|
+
"schema": "analytics",
|
|
168
|
+
"aliases": ["o"],
|
|
169
|
+
"primaryKey": ["id"],
|
|
170
|
+
"uniqueKeys": [["external_id"]],
|
|
171
|
+
"foreignKeys": [
|
|
172
|
+
{
|
|
173
|
+
"columns": ["customer_id"],
|
|
174
|
+
"references": {"table": "customers", "columns": ["id"]},
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"columns": [
|
|
178
|
+
{"name": "id", "type": "INT", "nullable": False, "primaryKey": True},
|
|
179
|
+
{"name": "amount", "type": "DECIMAL(10,2)", "nullable": True},
|
|
180
|
+
],
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Use the `type` key for column types. `dataType` / `data_type` are not accepted
|
|
187
|
+
aliases in this payload.
|
|
151
188
|
|
|
152
189
|
## API Reference
|
|
153
190
|
|
|
@@ -98,21 +98,25 @@ emission are intentionally out of scope.
|
|
|
98
98
|
|
|
99
99
|
```python
|
|
100
100
|
analysis = polyglot_sql.analyze_query(
|
|
101
|
-
"
|
|
101
|
+
"WITH base AS (SELECT id, amount FROM orders) SELECT * FROM base",
|
|
102
102
|
{
|
|
103
103
|
"dialect": "generic",
|
|
104
104
|
"schema": {
|
|
105
105
|
"tables": [
|
|
106
106
|
{
|
|
107
107
|
"name": "orders",
|
|
108
|
-
"columns": [
|
|
108
|
+
"columns": [
|
|
109
|
+
{"name": "id", "type": "INT", "nullable": False},
|
|
110
|
+
{"name": "amount", "type": "DECIMAL(10,2)", "nullable": True},
|
|
111
|
+
],
|
|
109
112
|
}
|
|
110
113
|
]
|
|
111
114
|
},
|
|
112
115
|
},
|
|
113
116
|
)
|
|
114
|
-
print(analysis["
|
|
115
|
-
print(analysis["
|
|
117
|
+
print(analysis["cteFacts"][0]["bodySql"]) # "SELECT id, amount FROM orders"
|
|
118
|
+
print(analysis["starProjections"][0]["expandedColumns"]) # ["id", "amount"]
|
|
119
|
+
print(analysis["projections"][0]["nullability"]) # "non_null"
|
|
116
120
|
print(analysis["baseTables"][0]["name"]) # "orders"
|
|
117
121
|
```
|
|
118
122
|
|
|
@@ -120,7 +124,40 @@ print(analysis["baseTables"][0]["name"]) # "orders"
|
|
|
120
124
|
`analysis["baseTables"]` reports deduplicated physical table dependencies across
|
|
121
125
|
nested CTEs, derived tables, subqueries, and set-operation branches. Validation
|
|
122
126
|
uses broad type families, while query analysis preserves parseable detailed
|
|
123
|
-
schema type strings for projection `typeHint` values.
|
|
127
|
+
schema type strings for projection `typeHint` values. `analysis["cteFacts"]`
|
|
128
|
+
reports top-level CTE definitions, `analysis["starProjections"]` records the
|
|
129
|
+
original star projections and schema-expanded columns, and each projection has
|
|
130
|
+
conservative `nullability`: `"non_null"`, `"nullable"`, or `"unknown"`.
|
|
131
|
+
|
|
132
|
+
Validation schema dictionaries use:
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
schema = {
|
|
136
|
+
"strict": True,
|
|
137
|
+
"tables": [
|
|
138
|
+
{
|
|
139
|
+
"name": "orders",
|
|
140
|
+
"schema": "analytics",
|
|
141
|
+
"aliases": ["o"],
|
|
142
|
+
"primaryKey": ["id"],
|
|
143
|
+
"uniqueKeys": [["external_id"]],
|
|
144
|
+
"foreignKeys": [
|
|
145
|
+
{
|
|
146
|
+
"columns": ["customer_id"],
|
|
147
|
+
"references": {"table": "customers", "columns": ["id"]},
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"columns": [
|
|
151
|
+
{"name": "id", "type": "INT", "nullable": False, "primaryKey": True},
|
|
152
|
+
{"name": "amount", "type": "DECIMAL(10,2)", "nullable": True},
|
|
153
|
+
],
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Use the `type` key for column types. `dataType` / `data_type` are not accepted
|
|
160
|
+
aliases in this payload.
|
|
124
161
|
|
|
125
162
|
## API Reference
|
|
126
163
|
|
|
@@ -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.3", optional = true, default-features = false }
|
|
110
110
|
|
|
111
111
|
[dev-dependencies]
|
|
112
112
|
pretty_assertions = "1.4"
|
|
@@ -318,19 +318,29 @@ scope, while `base_tables` reports deduplicated physical table dependencies
|
|
|
318
318
|
across CTEs, derived tables, subqueries, and set-operation branches. When a
|
|
319
319
|
`ValidationSchema` is supplied, detailed type strings such as `DECIMAL(10,2)`
|
|
320
320
|
are preserved in projection `type_hint` values when parseable.
|
|
321
|
+
`cte_facts` reports top-level CTE names, declared columns, original CTE body SQL,
|
|
322
|
+
and CTE output columns. `star_projections` reports the original top-level star
|
|
323
|
+
projection index, optional table qualifier, and schema-expanded columns when
|
|
324
|
+
known. Each projection also includes conservative `nullability`:
|
|
325
|
+
`non_null`, `nullable`, or `unknown`.
|
|
321
326
|
|
|
322
327
|
```rust
|
|
323
|
-
use polyglot_sql::{
|
|
328
|
+
use polyglot_sql::{
|
|
329
|
+
analyze_query, AnalyzeQueryOptions, DialectType, ProjectionNullability, QueryShape,
|
|
330
|
+
};
|
|
324
331
|
|
|
325
332
|
let schema: polyglot_sql::ValidationSchema = serde_json::from_value(serde_json::json!({
|
|
326
333
|
"tables": [{
|
|
327
334
|
"name": "orders",
|
|
328
|
-
"columns": [
|
|
335
|
+
"columns": [
|
|
336
|
+
{"name": "id", "type": "INT", "nullable": false},
|
|
337
|
+
{"name": "amount", "type": "DECIMAL(10,2)", "nullable": true}
|
|
338
|
+
]
|
|
329
339
|
}]
|
|
330
340
|
})).unwrap();
|
|
331
341
|
|
|
332
342
|
let analysis = analyze_query(
|
|
333
|
-
"SELECT
|
|
343
|
+
"WITH base AS (SELECT id, amount FROM orders) SELECT * FROM base",
|
|
334
344
|
AnalyzeQueryOptions {
|
|
335
345
|
dialect: DialectType::Generic,
|
|
336
346
|
schema: Some(schema),
|
|
@@ -338,12 +348,43 @@ let analysis = analyze_query(
|
|
|
338
348
|
).unwrap();
|
|
339
349
|
|
|
340
350
|
assert_eq!(analysis.shape, QueryShape::Select);
|
|
341
|
-
assert_eq!(analysis.
|
|
342
|
-
assert_eq!(analysis.
|
|
351
|
+
assert_eq!(analysis.cte_facts[0].name, "base");
|
|
352
|
+
assert_eq!(analysis.cte_facts[0].body_sql, "SELECT id, amount FROM orders");
|
|
353
|
+
assert_eq!(analysis.star_projections[0].expanded_columns, vec!["id", "amount"]);
|
|
354
|
+
assert_eq!(analysis.projections[0].nullability, ProjectionNullability::NonNull);
|
|
343
355
|
assert_eq!(analysis.base_tables[0].name, "orders");
|
|
344
|
-
assert_eq!(analysis.base_tables[0].alias.as_deref(), Some("o"));
|
|
345
356
|
```
|
|
346
357
|
|
|
358
|
+
External JSON schemas use this shape:
|
|
359
|
+
|
|
360
|
+
```json
|
|
361
|
+
{
|
|
362
|
+
"strict": true,
|
|
363
|
+
"tables": [
|
|
364
|
+
{
|
|
365
|
+
"name": "orders",
|
|
366
|
+
"schema": "analytics",
|
|
367
|
+
"aliases": ["o"],
|
|
368
|
+
"primaryKey": ["id"],
|
|
369
|
+
"uniqueKeys": [["external_id"]],
|
|
370
|
+
"foreignKeys": [
|
|
371
|
+
{
|
|
372
|
+
"columns": ["customer_id"],
|
|
373
|
+
"references": { "table": "customers", "columns": ["id"] }
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"columns": [
|
|
377
|
+
{ "name": "id", "type": "INT", "nullable": false, "primaryKey": true },
|
|
378
|
+
{ "name": "amount", "type": "DECIMAL(10,2)", "nullable": true }
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Use the `type` key for column types in JSON. `dataType` / `data_type` are not
|
|
386
|
+
accepted aliases.
|
|
387
|
+
|
|
347
388
|
### Tokenize
|
|
348
389
|
|
|
349
390
|
Access the raw token stream with full source position spans. Each token carries a `Span` with byte offsets and line/column numbers.
|
|
@@ -12189,6 +12189,7 @@ impl Generator {
|
|
|
12189
12189
|
let is_character_set = name_str == Some("CHARACTER SET");
|
|
12190
12190
|
let is_names = name_str == Some("NAMES");
|
|
12191
12191
|
let is_collate = name_str == Some("COLLATE");
|
|
12192
|
+
let is_identity_insert = name_str == Some("IDENTITY_INSERT");
|
|
12192
12193
|
let is_value_only =
|
|
12193
12194
|
matches!(&item.value, Expression::Identifier(id) if id.name.is_empty());
|
|
12194
12195
|
|
|
@@ -12216,6 +12217,11 @@ impl Generator {
|
|
|
12216
12217
|
self.write_keyword("COLLATE");
|
|
12217
12218
|
self.write_space();
|
|
12218
12219
|
self.generate_set_value(&item.value)?;
|
|
12220
|
+
} else if is_identity_insert {
|
|
12221
|
+
// T-SQL: SET IDENTITY_INSERT <table> ON|OFF
|
|
12222
|
+
self.write_keyword("IDENTITY_INSERT");
|
|
12223
|
+
self.write_space();
|
|
12224
|
+
self.generate_identity_insert_value(&item.value)?;
|
|
12219
12225
|
} else if has_variable_kind {
|
|
12220
12226
|
// Output: SET [VARIABLE] <name> = <value>
|
|
12221
12227
|
// VARIABLE keyword already written above if dialect requires it
|
|
@@ -12253,6 +12259,19 @@ impl Generator {
|
|
|
12253
12259
|
Ok(())
|
|
12254
12260
|
}
|
|
12255
12261
|
|
|
12262
|
+
fn generate_identity_insert_value(&mut self, value: &Expression) -> Result<()> {
|
|
12263
|
+
if let Expression::Tuple(tuple) = value {
|
|
12264
|
+
if tuple.expressions.len() == 2 {
|
|
12265
|
+
self.generate_expression(&tuple.expressions[0])?;
|
|
12266
|
+
self.write_space();
|
|
12267
|
+
self.generate_set_value(&tuple.expressions[1])?;
|
|
12268
|
+
return Ok(());
|
|
12269
|
+
}
|
|
12270
|
+
}
|
|
12271
|
+
|
|
12272
|
+
self.generate_set_value(value)
|
|
12273
|
+
}
|
|
12274
|
+
|
|
12256
12275
|
/// Generate a SET statement value, writing keyword values (DEFAULT, ON, OFF)
|
|
12257
12276
|
/// directly to avoid reserved keyword quoting.
|
|
12258
12277
|
fn generate_set_value(&mut self, value: &Expression) -> Result<()> {
|
|
@@ -93,9 +93,9 @@ pub use optimizer::{
|
|
|
93
93
|
pub use parser::Parser;
|
|
94
94
|
#[cfg(all(feature = "semantic", feature = "generate"))]
|
|
95
95
|
pub use query_analysis::{
|
|
96
|
-
analyze_query, AnalyzeQueryOptions, ColumnReferenceFact,
|
|
97
|
-
|
|
98
|
-
TransformKind,
|
|
96
|
+
analyze_query, AnalyzeQueryOptions, ColumnReferenceFact, CteFact, ProjectionFact,
|
|
97
|
+
ProjectionNullability, QueryAnalysis, QueryShape, ReferenceConfidence, RelationFact,
|
|
98
|
+
SetOperationBranchFact, SetOperationFact, StarProjectionFact, TransformKind,
|
|
99
99
|
};
|
|
100
100
|
#[cfg(feature = "semantic")]
|
|
101
101
|
pub use resolver::{is_column_ambiguous, resolve_column, Resolver, ResolverError, ResolverResult};
|
|
@@ -24377,6 +24377,34 @@ impl Parser {
|
|
|
24377
24377
|
return self.fallback_to_command(statement_start);
|
|
24378
24378
|
}
|
|
24379
24379
|
|
|
24380
|
+
// T-SQL: SET IDENTITY_INSERT schema.table ON|OFF.
|
|
24381
|
+
if matches!(
|
|
24382
|
+
self.config.dialect,
|
|
24383
|
+
Some(crate::dialects::DialectType::TSQL)
|
|
24384
|
+
) && self.match_identifier("IDENTITY_INSERT")
|
|
24385
|
+
{
|
|
24386
|
+
let table = self.parse_table_ref()?;
|
|
24387
|
+
let state = if self.check(TokenType::On) || self.check_keyword_text("OFF") {
|
|
24388
|
+
self.advance().text.to_uppercase()
|
|
24389
|
+
} else {
|
|
24390
|
+
return Err(self.parse_error("Expected ON or OFF after SET IDENTITY_INSERT table"));
|
|
24391
|
+
};
|
|
24392
|
+
|
|
24393
|
+
items.push(SetItem {
|
|
24394
|
+
name: Expression::Identifier(Identifier::new("IDENTITY_INSERT")),
|
|
24395
|
+
value: Expression::Tuple(Box::new(crate::expressions::Tuple {
|
|
24396
|
+
expressions: vec![
|
|
24397
|
+
Expression::Table(Box::new(table)),
|
|
24398
|
+
Expression::Identifier(Identifier::new(state)),
|
|
24399
|
+
],
|
|
24400
|
+
})),
|
|
24401
|
+
kind: None,
|
|
24402
|
+
no_equals: true,
|
|
24403
|
+
});
|
|
24404
|
+
|
|
24405
|
+
return Ok(Expression::SetStatement(Box::new(SetStatement { items })));
|
|
24406
|
+
}
|
|
24407
|
+
|
|
24380
24408
|
// ClickHouse: SET DEFAULT ROLE ... TO user - parse as command
|
|
24381
24409
|
if matches!(
|
|
24382
24410
|
self.config.dialect,
|