data-flow-control 0.1.7__tar.gz → 0.1.8__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.
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/Cargo.lock +15 -3
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/Cargo.toml +2 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/PKG-INFO +4 -4
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/derived_policy.rs +8 -5
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/exists.rs +38 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/expr.rs +2 -8
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/insert_output_policy.rs +297 -309
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/projection.rs +15 -1
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/resolution.rs +4 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/select.rs +1 -6
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/types.rs +1 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/write_path.rs +1 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/split.rs +2 -9
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/builders.rs +67 -13
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/mod.rs +4 -3
- data_flow_control-0.1.8/passant-core/tests/execution/kill.rs +259 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/having_where.rs +2 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/derived_policy.rs +18 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/in_semijoin.rs +26 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/meal_deduction.rs +95 -1
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/sql_builders.rs +38 -1
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/pyproject.toml +5 -4
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/clickhouse.py +2 -1
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/datafusion.py +2 -2
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/duckdb.py +26 -5
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/kill.py +9 -3
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/postgres.py +2 -1
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/aggregate_introspection.py +10 -10
- data_flow_control-0.1.8/python/data_flow_control/langchain/__init__.py +15 -0
- data_flow_control-0.1.7/passant-core/tests/execution/kill.rs +0 -116
- data_flow_control-0.1.7/python/data_flow_control/langchain/__init__.py +0 -8
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/LICENSE +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/Cargo.toml +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/benches/rewrite_perf.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/aggregate_registry.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/catalog.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/diagnostics.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/explain.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/full_push.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/identifiers.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/intern.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/ir.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/lib.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/optimizer.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/parser.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/partial_push.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/planner.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_compile.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_index.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_parser.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_pgn.pest +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/branch.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/compiled.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/delete.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/indexes.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/memory.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/policy_store/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/query_analysis.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewrite_stats.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewrite_strategy.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/aggregates.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/columns.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/constraint_preprocess.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/dimensions.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/helpers.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/limit.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/actions.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/applicability.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/dominance.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/scope_plan.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/plan/write_plan.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/policy_expr.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/scope.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/semiring.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_set_index.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/analysis.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/annotations.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/branch.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/source_sets/rewrites.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/ast_stats.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/columns.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/dialect.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/expr.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/expr_key.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/parse.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/sql/render.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/statement_tables.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/threshold.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/common/duckdb.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/common/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/conformance.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/main.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/partial_push.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/pgn.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/pgn_unique.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/policy_storage.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/rewrite_api_parity.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/semiring.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/source_sets.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/symmetric_self_join.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/threshold.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/completion/unique_not_unique.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/dialect.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/execution/insert.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/execution/main.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/execution/oracle.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/execution/remove.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/execution/update.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/expected/duckdb/remove_scan.sql +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/expected/postgres/remove_scan.sql +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/expected/sqlite/remove_scan.sql +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/explain_strategy.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/column_propagation.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/dimensions.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/exists_join.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/identifiers.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/insert_shapes.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/main.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/multi_source.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/operators.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/query_shapes.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/gaps/scalar_subquery.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/indexed_candidate_differential.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/insert_values_body.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/paper_examples.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/parser.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/planner.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/policy.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/policy_dialect.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/policy_store_memory.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/insert.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/joins.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/main.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/output.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/recursive.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/scan.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite/update.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite_candidate_regression.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite_fast_paths.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite_large_registry.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/rewrite_stats_timings.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/scan_ready_expr.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/source_set_split_no_parse.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/sql_columns.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/tests/ui_resolution.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/Cargo.toml +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/catalog.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/errors.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/mod.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/planner.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/policy.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/bindings/stats.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-py/src/lib.rs +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/__init__.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/_rust.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/__init__.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/base.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/pg_catalog.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/registry.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/sqlite.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/adapters/umbra.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/catalog.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/connection.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/dialect.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/agent.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/call_tool_with_dataflow.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/database.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/middleware.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/schema.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/sql_validation.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/tool_spec.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/langchain/wrapper.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/options.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/planner.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/policy.py +0 -0
- {data_flow_control-0.1.7 → data_flow_control-0.1.8}/python/data_flow_control/ui.py +0 -0
|
@@ -1593,7 +1593,7 @@ dependencies = [
|
|
|
1593
1593
|
|
|
1594
1594
|
[[package]]
|
|
1595
1595
|
name = "passant-cli"
|
|
1596
|
-
version = "0.1.
|
|
1596
|
+
version = "0.1.8"
|
|
1597
1597
|
dependencies = [
|
|
1598
1598
|
"anyhow",
|
|
1599
1599
|
"assert_cmd",
|
|
@@ -1605,7 +1605,7 @@ dependencies = [
|
|
|
1605
1605
|
|
|
1606
1606
|
[[package]]
|
|
1607
1607
|
name = "passant-core"
|
|
1608
|
-
version = "0.1.
|
|
1608
|
+
version = "0.1.8"
|
|
1609
1609
|
dependencies = [
|
|
1610
1610
|
"anyhow",
|
|
1611
1611
|
"criterion",
|
|
@@ -1623,7 +1623,7 @@ dependencies = [
|
|
|
1623
1623
|
|
|
1624
1624
|
[[package]]
|
|
1625
1625
|
name = "passant-py"
|
|
1626
|
-
version = "0.1.
|
|
1626
|
+
version = "0.1.8"
|
|
1627
1627
|
dependencies = [
|
|
1628
1628
|
"passant-core",
|
|
1629
1629
|
"pyo3",
|
|
@@ -2411,6 +2411,18 @@ checksum = "05a528114c392209b3264855ad491fcce534b94a38771b0a0b97a79379275ce8"
|
|
|
2411
2411
|
dependencies = [
|
|
2412
2412
|
"log",
|
|
2413
2413
|
"serde",
|
|
2414
|
+
"sqlparser_derive",
|
|
2415
|
+
]
|
|
2416
|
+
|
|
2417
|
+
[[package]]
|
|
2418
|
+
name = "sqlparser_derive"
|
|
2419
|
+
version = "0.3.0"
|
|
2420
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2421
|
+
checksum = "da5fc6819faabb412da764b99d3b713bb55083c11e7e0c00144d386cd6a1939c"
|
|
2422
|
+
dependencies = [
|
|
2423
|
+
"proc-macro2",
|
|
2424
|
+
"quote",
|
|
2425
|
+
"syn 2.0.117",
|
|
2414
2426
|
]
|
|
2415
2427
|
|
|
2416
2428
|
[[package]]
|
|
@@ -3,7 +3,7 @@ members = ["passant-core", "passant-py"]
|
|
|
3
3
|
resolver = "2"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.1.
|
|
6
|
+
version = "0.1.8"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
license = "MIT"
|
|
9
9
|
authors = ["Charlie Summers"]
|
|
@@ -14,7 +14,7 @@ clap = { version = "4.5", features = ["derive"] }
|
|
|
14
14
|
pyo3 = { version = "0.23", features = ["abi3-py39"] }
|
|
15
15
|
serde = { version = "1.0", features = ["derive"] }
|
|
16
16
|
serde_json = "1.0"
|
|
17
|
-
sqlparser = { version = "0.53", features = ["serde"] }
|
|
17
|
+
sqlparser = { version = "0.53", features = ["serde", "visitor"] }
|
|
18
18
|
thiserror = "2.0"
|
|
19
19
|
smallvec = "1.14"
|
|
20
20
|
assert_cmd = "2.0"
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: data-flow-control
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Requires-Dist: boto3>=1.26.0
|
|
3
|
+
Version: 0.1.8
|
|
5
4
|
Requires-Dist: duckdb>=1.3.0
|
|
6
|
-
Requires-Dist: langchain>=1.3,<2
|
|
7
|
-
Requires-Dist: langchain-core>=1.3,<2
|
|
8
5
|
Requires-Dist: numpy>=1.24.4
|
|
9
6
|
Requires-Dist: sqlglot==28.3.0
|
|
10
7
|
Requires-Dist: clickhouse-connect>=0.7.0 ; extra == 'clickhouse'
|
|
@@ -14,10 +11,13 @@ Requires-Dist: maturin>=1.7.0 ; extra == 'dev'
|
|
|
14
11
|
Requires-Dist: pre-commit>=4.0.0 ; extra == 'dev'
|
|
15
12
|
Requires-Dist: pytest>=8.4.2 ; extra == 'dev'
|
|
16
13
|
Requires-Dist: ruff>=0.11.0 ; extra == 'dev'
|
|
14
|
+
Requires-Dist: langchain>=1.3,<2 ; extra == 'langchain'
|
|
15
|
+
Requires-Dist: langchain-core>=1.3,<2 ; extra == 'langchain'
|
|
17
16
|
Requires-Dist: psycopg[binary]>=3.2.0 ; extra == 'postgres'
|
|
18
17
|
Provides-Extra: clickhouse
|
|
19
18
|
Provides-Extra: datafusion
|
|
20
19
|
Provides-Extra: dev
|
|
20
|
+
Provides-Extra: langchain
|
|
21
21
|
Provides-Extra: postgres
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Summary: Rust-backed Data Flow Control rewrite engine
|
{data_flow_control-0.1.7 → data_flow_control-0.1.8}/passant-core/src/rewriter/derived_policy.rs
RENAMED
|
@@ -257,7 +257,9 @@ fn inject_hidden_projections_in_factor(
|
|
|
257
257
|
|
|
258
258
|
let inner_scope = TableScope::from_select(inner_select);
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
let mut deferred_indices = prep.deferred_indices.iter().copied().collect::<Vec<_>>();
|
|
261
|
+
deferred_indices.sort_unstable();
|
|
262
|
+
for index in deferred_indices {
|
|
261
263
|
let Some(policy) = store.policy(index) else {
|
|
262
264
|
continue;
|
|
263
265
|
};
|
|
@@ -422,10 +424,8 @@ fn projection_has_equivalent(select: &Select, expr: &Expr, alias: &str) -> bool
|
|
|
422
424
|
let key = crate::sql::ExprKey::from_expr(expr);
|
|
423
425
|
select.projection.iter().any(|item| {
|
|
424
426
|
if let Some((proj_expr, proj_alias)) = projection_expr_and_name(item) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}
|
|
428
|
-
return crate::sql::ExprKey::from_expr(proj_expr) == key;
|
|
427
|
+
return proj_alias.is_some_and(|name| name == alias)
|
|
428
|
+
&& crate::sql::ExprKey::from_expr(proj_expr) == key;
|
|
429
429
|
}
|
|
430
430
|
false
|
|
431
431
|
})
|
|
@@ -441,6 +441,9 @@ fn find_equivalent_projection_alias(select: &Select, metric_expr: &Expr) -> Opti
|
|
|
441
441
|
continue;
|
|
442
442
|
}
|
|
443
443
|
if let Some(name) = alias {
|
|
444
|
+
if name.starts_with("__passant_filter_") {
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
444
447
|
return Some(name.to_string());
|
|
445
448
|
}
|
|
446
449
|
if let Some(name) = super::expr::projected_column_name(expr) {
|
|
@@ -5,6 +5,7 @@ use sqlparser::ast::{
|
|
|
5
5
|
SelectItem, SetExpr, Statement, TableAlias, TableFactor, TableWithJoins,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
use crate::catalog::TableCatalog;
|
|
8
9
|
use crate::identifiers::{TableKey, column_name_from_expr, table_name_from_column_expr};
|
|
9
10
|
use crate::parser::parse_query;
|
|
10
11
|
use crate::partial_push::ExtraDfcFilter;
|
|
@@ -43,7 +44,11 @@ fn table_with_joins_contains_base(table: &TableWithJoins, base: &str) -> bool {
|
|
|
43
44
|
})
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
fn from_index_for_in_outer_expr(
|
|
47
|
+
fn from_index_for_in_outer_expr(
|
|
48
|
+
select: &Select,
|
|
49
|
+
outer_expr: &Expr,
|
|
50
|
+
catalog: &TableCatalog,
|
|
51
|
+
) -> usize {
|
|
47
52
|
if let Some(table_name) = table_name_from_column_expr(outer_expr) {
|
|
48
53
|
let target = table_name.as_str();
|
|
49
54
|
for (index, table_with_joins) in select.from.iter().enumerate() {
|
|
@@ -52,9 +57,40 @@ fn from_index_for_in_outer_expr(select: &Select, outer_expr: &Expr) -> usize {
|
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
}
|
|
60
|
+
if let Some(column) = column_name_from_expr(outer_expr) {
|
|
61
|
+
let matching = select
|
|
62
|
+
.from
|
|
63
|
+
.iter()
|
|
64
|
+
.enumerate()
|
|
65
|
+
.filter_map(|(index, table_with_joins)| {
|
|
66
|
+
table_with_joins_contains_column(table_with_joins, column.as_str(), catalog)
|
|
67
|
+
.then_some(index)
|
|
68
|
+
})
|
|
69
|
+
.collect::<Vec<_>>();
|
|
70
|
+
if let [index] = matching.as_slice() {
|
|
71
|
+
return *index;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
55
74
|
select.from.len().saturating_sub(1)
|
|
56
75
|
}
|
|
57
76
|
|
|
77
|
+
fn table_with_joins_contains_column(
|
|
78
|
+
table: &TableWithJoins,
|
|
79
|
+
column: &str,
|
|
80
|
+
catalog: &TableCatalog,
|
|
81
|
+
) -> bool {
|
|
82
|
+
std::iter::once(&table.relation)
|
|
83
|
+
.chain(table.joins.iter().map(|join| &join.relation))
|
|
84
|
+
.filter_map(table_factor_base_and_alias)
|
|
85
|
+
.any(|(base, _)| {
|
|
86
|
+
catalog.columns(&base).is_some_and(|columns| {
|
|
87
|
+
columns
|
|
88
|
+
.iter()
|
|
89
|
+
.any(|candidate| candidate.eq_ignore_ascii_case(column))
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
58
94
|
fn qualify_unqualified_column_in_expr(expr: &mut Expr, column: &str, table: &str) {
|
|
59
95
|
match expr {
|
|
60
96
|
Expr::Identifier(ident) if ident.value.eq_ignore_ascii_case(column) => {
|
|
@@ -413,7 +449,7 @@ impl PassantRewriter {
|
|
|
413
449
|
"IN rewrite requires a FROM clause",
|
|
414
450
|
));
|
|
415
451
|
}
|
|
416
|
-
let from_index = from_index_for_in_outer_expr(select, expr.as_ref());
|
|
452
|
+
let from_index = from_index_for_in_outer_expr(select, expr.as_ref(), &self.catalog);
|
|
417
453
|
select.from[from_index].joins.push(Join {
|
|
418
454
|
relation: TableFactor::Derived {
|
|
419
455
|
lateral: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
use crate::aggregate_registry::AggregateRegistry;
|
|
2
2
|
use crate::sql::{parse_projection_expr, wrap_table_with_filter};
|
|
3
3
|
use sqlparser::ast::{
|
|
4
|
-
|
|
4
|
+
Expr, FunctionArg, FunctionArgExpr, FunctionArguments, SelectItem, TableFactor,
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
use crate::diagnostics::RewriteError;
|
|
@@ -89,13 +89,7 @@ pub(crate) fn add_filter(
|
|
|
89
89
|
Ok(())
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
pub(crate)
|
|
93
|
-
Expr::BinaryOp {
|
|
94
|
-
left: Box::new(left),
|
|
95
|
-
op: BinaryOperator::And,
|
|
96
|
-
right: Box::new(right),
|
|
97
|
-
}
|
|
98
|
-
}
|
|
92
|
+
pub(crate) use crate::sql::builders::and_expr;
|
|
99
93
|
|
|
100
94
|
pub(crate) fn parse_expr(sql: &str) -> Result<Expr, RewriteError> {
|
|
101
95
|
parse_projection_expr(sql)
|