pytrilogy 0.3.549__tar.gz → 0.3.552__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.
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/PKG-INFO +1 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/pyproject.toml +1 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/__init__.py +1 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/enums.py +3 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/fingerprint.py +1 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/build.py +9 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/execute.py +103 -51
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/merge_irrelevant_group_by.py +41 -16
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/predicate_pushdown.py +4 -2
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/utils.py +4 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/condition_utility.py +11 -2
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/consumer_proofs.py +2 -2
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/grain_utility.py +15 -18
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/concept_graph.py +78 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/condition_placement.py +156 -16
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/extent_ownership.py +13 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/final_cover.py +11 -5
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/group_graph.py +9 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/group_rules.py +6 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/join_plan.py +31 -11
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/keyspace.py +8 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/models.py +6 -3
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/strategy_builder.py +57 -10
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/filter.py +2 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/source_pushdown.py +18 -3
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/datasource_rules.py +10 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/Cargo.lock +1 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/Cargo.toml +1 -1
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/.scripts/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/.scripts/build_backend.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/.scripts/sync_version.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/LICENSE.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/constants.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/conversation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/enums.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/execute.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/models.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/prompts.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/anthropic.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/base.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/deepseek.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/google.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/openai.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/openrouter.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/providers/utils.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/ai/syntax_examples.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/authoring/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/authoring/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/constants.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/assertions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/average_parts.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/casts.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/constants.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/domain_graph.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/domain_validation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/env_processor.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/environment_helpers.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/ergonomics.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/exceptions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/functions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/grain_pin.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/graph.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/graph_models.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/having_normalization.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/internal.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/like_patterns.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/author.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/build_environment.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/copying.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/core.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/datasource.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/environment.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/keyspace.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/models/reference_index.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimization.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/atom_contract.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/base_optimization.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/collapse_single_parent.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/existence_having_fold.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/filtered_aggregate.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/full_join_lowering.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/hide_unused_concept.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/identity_group.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/inline_datasource.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/join_hoist.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/merge_twin_scans.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/null_safe_join.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/order_inner_joins.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/preserved_join_keys.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/reuse_parent_lookup.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/semi_join_pushdown.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/strip_redundant_not_null.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/union_dim_pushdown.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/value_set_join_upgrade.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/aggregate_rollup.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/basic_graph.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/concept_strategies_v4.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/constants.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/discovery_utility.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/discovery_validation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/join_key_groups.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/join_resolution.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/model_ambiguity.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/presence_probe.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_helpers/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_helpers/condition_routing.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_helpers/datasource_injection.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_helpers/datasource_nodes.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_helpers/source_scoring.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_merge_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/node_generators/select_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/base_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/filter_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/group_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/merge_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/recursive_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/select_node_v2.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/subselect_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/union_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/unnest_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/nodes/window_node.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/null_provenance.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/partial_bridging.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/plan_trace.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/plan_trace_model.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/relation_rollup.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/scan_partials.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/source_dominance.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/statement_scope.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/utility.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/condition_injection.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/constants.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/edges.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/functional_dependency.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/group_behaviors.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/history.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_build.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_coalescing.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_model.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_obligations.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_search.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/network_topology.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/projection.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/region_domains.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/region_reads.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/renders.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/root_partition.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/source_planning.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/staged_where.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_helper/union_arms.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/aggregate.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/basic.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/condition_sources.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/constant.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/dispatch.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/group_to.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/multiselect.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/nested_select.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/recursive.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/rollup_select.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/root.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/rowset.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/rowset_witness.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/subselect.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/union.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/union_select.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/unnest.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/processing/v4_node_generators/window.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/query_processor.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/scope_diagnostics.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/author.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/build.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/statements/execute.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/table_processor.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/union_find.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/utility.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/concept.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/datasource.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/environment.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/fix.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/validation/rows.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/where_scope_normalization.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/base.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/bigquery.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/bigquery_engine.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/bigquery_persist.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/bigquery_staging.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/cancel.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/clickhouse.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/clickhouse_chdb.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/config.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/databricks.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/dataframe.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/duckdb.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/duckdb_pool.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/duckdb_uv.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/duckdb_vgi.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/enums.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/haybarn_engine.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/join_barriers.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/metadata.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/mock.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/mock_pattern.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/mysql.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/postgres.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/presto.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/python_source.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/results.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/snowflake.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/sql_server.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/sqlite.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/dialect/table_function.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/engine.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/assertions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/client_copy.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/config.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/envs.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/model_fingerprint.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/outputs.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/report.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/staged_write.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/AGENTS.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/CLAUDE.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/cache.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/declaration.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/exceptions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/isolation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/partitions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/persistence.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/phases.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/snapshot.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/state_store.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/state/watermarks.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/execution/write_order.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/executor.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/hooks/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/hooks/base_hook.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/hooks/graph_hook.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/hooks/query_debugger.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/adapters.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/arrow.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/click_support.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/contract.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/describe.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/errors.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/runner.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/sinks.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/io/vgi.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/metadata/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parser.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/exceptions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/helpers.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/parse_engine_v2.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/pretty.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/render.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/trilogy.lark +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/concept_syntax.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/errors.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/function_syntax.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/hydration.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/import_service.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/lark_backend.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/model.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/pest_backend.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rowset_semantics.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/chart_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/concept_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/conditional_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/expression_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/function_definition_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/function_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/import_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/merge_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/multiselect_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/operational_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/order_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/persist_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/rawsql_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/rollup_lift.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/rowset_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/select_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/select_statement_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/statement_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/subselect_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/token_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/tvf_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules/type_rules.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/rules_context.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/select_finalize.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/semantic_scope.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/semantic_state.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/statement_planner.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/statement_plans.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/symbols.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/parsing/v2/syntax.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/py.typed +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/render.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/altair_renderer.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/base.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/chart_theme.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/rich_types.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/terminal_renderer.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/rendering/theme.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/backends/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/backends/base.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/backends/html.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/backends/png.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/charts.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/document.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/runner.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/report/tables.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/AGENTS.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/CLAUDE.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_info.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_info_docs/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_info_docs/cli.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_info_docs/content.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_info_docs/directory.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_render.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_sessions.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_sql_tools.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/agent_tools.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/click_utils.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/cloud.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/cloud_models.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/common.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/database.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/README.md +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/build.sh +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/examples/basic_usage.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/directory_resolver.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/graph.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/lib.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/main.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/network_search.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/parser.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/python_bindings.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/resolver.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/trilogy.pest +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/src/trilogy_parser.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/base.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/cli_integration.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/customer.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/main.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/nesting_limit.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/orders.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/parse_cost.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/public_api.rs +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/test_data/base.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency/tests/test_data/consumer.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/dependency.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_core.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_execution.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_ingest.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_init.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_models.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_parallel.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_refresh.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/display_validation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/env_commands.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/environment.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/explore.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/explore_seen.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/file.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/file_helpers/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/file_helpers/backends.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/file_helpers/preql_description.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/file_helpers/preql_validation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/fmt.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/fk_inference.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/foreign_keys.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/formatting.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/introspection.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/ingest_helpers/typing.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/init.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/parallel_execution.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/plan.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/project_config.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/public.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/refresh.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/render.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/run.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/connection_spec.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/file_discovery.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/index_generation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/jobs.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/mcp_server.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/models.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/state_cache.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/state_computation.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/serve_helpers/studio_bundle.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/single_execution.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/source.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/source_identity.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/state.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/testing.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/trilogy.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/scripts/validate_agent.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/staging.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/__init__.py +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/bytes.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/chart.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/collection.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/color.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/currency.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/date.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/display.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/geography.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/metric.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/money.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/net.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/ranking.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/report.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/std/semantic.preql +0 -0
- {pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/utility.py +0 -0
|
@@ -21,6 +21,7 @@ markers = [
|
|
|
21
21
|
"clickhouse_server: marks tests as requiring a real ClickHouse server (env vars TRILOGY_CLICKHOUSE_*)",
|
|
22
22
|
"databricks_server: marks tests as requiring a real Databricks SQL warehouse (env vars DATABRICKS_*)",
|
|
23
23
|
"bigquery_execution: marks tests as requiring a real BigQuery project + GCS staging (env vars TRILOGY_BIGQUERY_*)",
|
|
24
|
+
"gcp_credentials: marks tests as needing Google Cloud credentials (ADC for BigQuery, GOOGLE_HMAC_* for GCS); skipped when TRILOGY_SKIP_GCP_CREDENTIAL_TESTS is set",
|
|
24
25
|
"v4_parity: discovery planner correctness cases (local_scripts/v4_evals)",
|
|
25
26
|
"cloud_live: marks tests as hitting a real trilogy-cloud API and triggering real job runs (env vars TRILOGY_CLOUD_TOKEN + TRILOGY_CLOUD_API)",
|
|
26
27
|
]
|
|
@@ -502,8 +502,10 @@ NULL_STRICT_FUNCTIONS: frozenset[FunctionType] = frozenset(
|
|
|
502
502
|
{
|
|
503
503
|
FunctionType.ALIAS,
|
|
504
504
|
FunctionType.PARENTHETICAL,
|
|
505
|
-
# a value grouped by
|
|
505
|
+
# a value grouped by its anchors exists on their rows only
|
|
506
506
|
FunctionType.GROUP,
|
|
507
|
+
# strict in its expression; its anchors say where it is evaluated
|
|
508
|
+
# (`condition_utility._strict_arguments`)
|
|
507
509
|
FunctionType.GRAIN_PIN,
|
|
508
510
|
FunctionType.CAST,
|
|
509
511
|
FunctionType.CONCAT_STRICT,
|
|
@@ -193,7 +193,7 @@ def _address_token(address: Address | str) -> str:
|
|
|
193
193
|
*address.partition_columns,
|
|
194
194
|
*additional,
|
|
195
195
|
*([f"#{address.source_name}"] if address.source_name else []),
|
|
196
|
-
*(["args", *address.static_args] if address.
|
|
196
|
+
*(["args", *address.static_args] if address.static_args else []),
|
|
197
197
|
)
|
|
198
198
|
|
|
199
199
|
|
|
@@ -315,6 +315,15 @@ def is_grouping_identity(concept: BuildConcept) -> bool:
|
|
|
315
315
|
)
|
|
316
316
|
|
|
317
317
|
|
|
318
|
+
def is_grain_pinned(value: object) -> bool:
|
|
319
|
+
"""A value evaluated on the select's rows (`grain_pin`): its anchors say
|
|
320
|
+
where, and a row padded on one still evaluates it, so it proves none of
|
|
321
|
+
them and no padded row lacks it."""
|
|
322
|
+
if isinstance(value, BuildConcept):
|
|
323
|
+
value = value.lineage
|
|
324
|
+
return isinstance(value, BuildFunction) and value.operator == FunctionType.GRAIN_PIN
|
|
325
|
+
|
|
326
|
+
|
|
318
327
|
def concept_is_relevant(
|
|
319
328
|
concept: BuildConcept,
|
|
320
329
|
others: list[BuildConcept],
|
|
@@ -51,6 +51,7 @@ from trilogy.core.models.build import (
|
|
|
51
51
|
DataType,
|
|
52
52
|
LooseBuildConceptList,
|
|
53
53
|
RawColumnExpr,
|
|
54
|
+
get_concept_row_arguments,
|
|
54
55
|
)
|
|
55
56
|
from trilogy.core.models.datasource import Address
|
|
56
57
|
from trilogy.core.utility import safe_quote
|
|
@@ -210,45 +211,97 @@ def _reads_same_sets(
|
|
|
210
211
|
|
|
211
212
|
def filter_case_elided(cte: CTE | UnionCTE, lineage: BuildFilterItem) -> bool:
|
|
212
213
|
"""A filter's per-row CASE WHEN is redundant, and renders as bare content,
|
|
213
|
-
when
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
from trilogy.core.processing.condition_utility import
|
|
214
|
+
when every AND-atom of its predicate holds on every row this CTE reads
|
|
215
|
+
(`_atom_holds`). One predicate may be held partly by the CTE's own WHERE
|
|
216
|
+
and partly by parents, as when pushdown moves some atoms of the WHERE
|
|
217
|
+
into a parent's HAVING."""
|
|
218
|
+
from trilogy.core.processing.condition_utility import (
|
|
219
|
+
condition_implies,
|
|
220
|
+
decompose_condition,
|
|
221
|
+
)
|
|
218
222
|
|
|
219
223
|
where_cond = lineage.where.conditional
|
|
224
|
+
own = cte.condition
|
|
225
|
+
if own is not None and (own == where_cond or condition_implies(own, where_cond)):
|
|
226
|
+
return True
|
|
227
|
+
return all(
|
|
228
|
+
_atom_holds(cte, atom, lineage) for atom in decompose_condition(where_cond)
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _atom_holds(cte: CTE | UnionCTE, atom: BoolExpr, lineage: BuildFilterItem) -> bool:
|
|
233
|
+
"""The CTE's own condition implies the atom, or, under no join that could
|
|
234
|
+
NULL-pad a row (INNER only), every column the atom reads comes from plain
|
|
235
|
+
CTE parents where it holds: a group parent's HAVING holding the filter's
|
|
236
|
+
aggregate condition, or a projection passing that column through from
|
|
237
|
+
one."""
|
|
238
|
+
from trilogy.core.processing.condition_utility import condition_implies
|
|
239
|
+
|
|
240
|
+
if not isinstance(cte, CTE):
|
|
241
|
+
return False
|
|
220
242
|
if cte.condition is not None and (
|
|
221
|
-
cte.condition
|
|
243
|
+
atom == cte.condition or condition_implies(cte.condition, atom)
|
|
222
244
|
):
|
|
223
245
|
return True
|
|
224
|
-
if
|
|
225
|
-
return False
|
|
226
|
-
if isinstance(cte, CTE) and any(
|
|
246
|
+
if any(
|
|
227
247
|
not isinstance(join, Join) or join.join_type != JoinType.INNER
|
|
228
248
|
for join in cte.joins
|
|
229
249
|
):
|
|
230
250
|
return False
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
and
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
251
|
+
parents = {parent.name: parent for parent in cte.parent_ctes}
|
|
252
|
+
refs = get_concept_row_arguments(atom)
|
|
253
|
+
return bool(refs) and all(
|
|
254
|
+
(sources := cte.source_map.get(r.address))
|
|
255
|
+
and all(
|
|
256
|
+
isinstance(parent := parents.get(source), CTE)
|
|
257
|
+
and _reads_same_sets(cte, parent, lineage)
|
|
258
|
+
and _atom_holds(parent, atom, lineage)
|
|
259
|
+
for source in sources
|
|
239
260
|
)
|
|
240
|
-
and _reads_same_sets(cte, parent, lineage)
|
|
241
|
-
}
|
|
242
|
-
if not guaranteeing:
|
|
243
|
-
return False
|
|
244
|
-
refs = {a.address for a in lineage.content_concept_arguments}
|
|
245
|
-
refs |= {a.address for a in lineage.where.row_arguments}
|
|
246
|
-
return all(
|
|
247
|
-
(sources := cte.source_map.get(r)) and set(sources) <= guaranteeing
|
|
248
261
|
for r in refs
|
|
249
262
|
)
|
|
250
263
|
|
|
251
264
|
|
|
265
|
+
def collapses_at(c: BuildConcept, grain: set[str]) -> bool:
|
|
266
|
+
"""A filter whose keys the grain holds but whose predicate reads outside
|
|
267
|
+
it is a property of the grain, not a grouping key: the per-row ``CASE
|
|
268
|
+
WHEN cond THEN content END`` fans a key out into ``{content, NULL}``, so
|
|
269
|
+
a GROUP BY on it breaks the stream's dedup to the grain. A keyless
|
|
270
|
+
one-value filter collapses only in a one-row group."""
|
|
271
|
+
if not isinstance(c.lineage, BuildFilterItem):
|
|
272
|
+
return False
|
|
273
|
+
keys = c.keys or set()
|
|
274
|
+
if keys:
|
|
275
|
+
if not keys <= grain:
|
|
276
|
+
return False
|
|
277
|
+
elif grain or c.granularity != Granularity.SINGLE_ROW:
|
|
278
|
+
return False
|
|
279
|
+
return not {a.address for a in c.lineage.where.row_arguments} <= grain
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def collapsed_filters(cte: CTE) -> frozenset[str]:
|
|
283
|
+
"""The filters a grouping CTE renders (an output, or an argument of one
|
|
284
|
+
it computes) that collapse at its grain (`collapses_at`)."""
|
|
285
|
+
if not cte.group_to_grain:
|
|
286
|
+
return frozenset()
|
|
287
|
+
grain = set(cte.grain.components)
|
|
288
|
+
found: set[str] = set()
|
|
289
|
+
seen: set[str] = set()
|
|
290
|
+
stack = list(cte.output_columns)
|
|
291
|
+
while stack:
|
|
292
|
+
c = stack.pop()
|
|
293
|
+
if c.address in seen:
|
|
294
|
+
continue
|
|
295
|
+
seen.add(c.address)
|
|
296
|
+
if collapses_at(c, grain):
|
|
297
|
+
found.add(c.address)
|
|
298
|
+
if not cte.source_map.get(c.address) and isinstance(
|
|
299
|
+
c.lineage, BuildConceptArgs
|
|
300
|
+
):
|
|
301
|
+
stack.extend(c.lineage.concept_arguments)
|
|
302
|
+
return frozenset(found)
|
|
303
|
+
|
|
304
|
+
|
|
252
305
|
@dataclass
|
|
253
306
|
class CTE:
|
|
254
307
|
name: str
|
|
@@ -280,6 +333,9 @@ class CTE:
|
|
|
280
333
|
partial_sources: dict[str, BuildConcept] = field(default_factory=dict)
|
|
281
334
|
# See `QueryDatasource.grouping_sets`.
|
|
282
335
|
grouping_sets: BuildGroupingSets | None = None
|
|
336
|
+
# The filters this CTE collapses to its grain (`collapsed_filters`),
|
|
337
|
+
# decided on the grain it is born with; None until then.
|
|
338
|
+
collapsed_filters: frozenset[str] | None = None
|
|
283
339
|
order_by: BuildOrderBy | None = None
|
|
284
340
|
limit: int | None = None
|
|
285
341
|
base_name_override: Address | str | None = None
|
|
@@ -297,6 +353,8 @@ class CTE:
|
|
|
297
353
|
# Own the list: callers pass a node's or a source's, which the
|
|
298
354
|
# optimizers grow in place.
|
|
299
355
|
self.output_columns = assume_unique(list(self.output_columns))
|
|
356
|
+
if self.collapsed_filters is None:
|
|
357
|
+
self.collapsed_filters = collapsed_filters(self)
|
|
300
358
|
|
|
301
359
|
@classmethod
|
|
302
360
|
def from_datasource(cls, datasource: BuildDatasource) -> DatasourceCTE:
|
|
@@ -505,6 +563,7 @@ class CTE:
|
|
|
505
563
|
)
|
|
506
564
|
self.region_zero_filled = self.region_zero_filled | other.region_zero_filled
|
|
507
565
|
self.zero_filled = self.zero_filled | other.zero_filled
|
|
566
|
+
self.collapsed_filters = self.collapsed | other.collapsed
|
|
508
567
|
self.distinct_counts = self.distinct_counts | other.distinct_counts
|
|
509
568
|
self.partial_sources = {**self.partial_sources, **other.partial_sources}
|
|
510
569
|
self.hidden_concepts = mutually_hidden
|
|
@@ -814,6 +873,7 @@ class CTE:
|
|
|
814
873
|
else self.zero_filled
|
|
815
874
|
)
|
|
816
875
|
self.group_to_grain = group
|
|
876
|
+
self.collapsed_filters = collapsed_filters(self)
|
|
817
877
|
self.zero_filled = zero_filled_counts(
|
|
818
878
|
self.output_columns,
|
|
819
879
|
self.nullable_concepts,
|
|
@@ -821,35 +881,27 @@ class CTE:
|
|
|
821
881
|
kept,
|
|
822
882
|
)
|
|
823
883
|
|
|
884
|
+
@property
|
|
885
|
+
def collapsed(self) -> frozenset[str]:
|
|
886
|
+
return self.collapsed_filters or frozenset()
|
|
887
|
+
|
|
824
888
|
def filter_collapses_to_grain(self, c: BuildConcept) -> bool:
|
|
825
|
-
"""A filter virtual
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
and isinstance(c.lineage, BuildFilterItem)
|
|
889
|
+
"""A filter virtual this CTE collapses to its grain (`collapsed_filters`)
|
|
890
|
+
renders as ``MAX(CASE ...)`` and stays out of the GROUP BY, unless its
|
|
891
|
+
CASE never fans out here: this CTE's own WHERE reads it, or its
|
|
892
|
+
predicate holds on every row (`filter_case_elided`), so the bare
|
|
893
|
+
content, which the grain determines, stays a group key.
|
|
894
|
+
|
|
895
|
+
The grain half is the planner's: decided on the grain the CTE is born
|
|
896
|
+
with, re-decided where the optimizer regroups it (`regroup`), and
|
|
897
|
+
carried where it folds a child in (`carry_child_state`). The WHERE and
|
|
898
|
+
elision half reads the final CTE, since pushdown moves conditions
|
|
899
|
+
after planning (seams 47-49 of
|
|
900
|
+
`docs/query_gen_simplification_audit_2026_10.md`)."""
|
|
901
|
+
if c.address not in self.collapsed or not isinstance(
|
|
902
|
+
c.lineage, BuildFilterItem
|
|
840
903
|
):
|
|
841
904
|
return False
|
|
842
|
-
grain_components = set(self.grain.components)
|
|
843
|
-
keys = c.keys or set()
|
|
844
|
-
if keys:
|
|
845
|
-
if not keys <= grain_components:
|
|
846
|
-
return False
|
|
847
|
-
elif grain_components or c.granularity != Granularity.SINGLE_ROW:
|
|
848
|
-
# a keyless one-value filter collapses only in a one-row group
|
|
849
|
-
return False
|
|
850
|
-
where_args = {a.address for a in c.lineage.where.row_arguments}
|
|
851
|
-
if where_args <= grain_components:
|
|
852
|
-
return False
|
|
853
905
|
if self.source_map.get(c.address, []):
|
|
854
906
|
# this CTE's own WHERE runs before the GROUP BY and reads the row
|
|
855
907
|
return not (
|
{pytrilogy-0.3.549 → pytrilogy-0.3.552}/trilogy/core/optimizations/merge_irrelevant_group_by.py
RENAMED
|
@@ -11,6 +11,7 @@ from trilogy.core.models.execute import (
|
|
|
11
11
|
Join,
|
|
12
12
|
RecursiveCTE,
|
|
13
13
|
UnionCTE,
|
|
14
|
+
collapses_at,
|
|
14
15
|
)
|
|
15
16
|
from trilogy.core.optimizations.base_optimization import MergedCTEMap, OptimizationRule
|
|
16
17
|
from trilogy.core.optimizations.utils import (
|
|
@@ -24,10 +25,7 @@ from trilogy.core.optimizations.utils import (
|
|
|
24
25
|
render_cte_used_map,
|
|
25
26
|
repoint_consumers,
|
|
26
27
|
)
|
|
27
|
-
from trilogy.core.processing.grain_utility import
|
|
28
|
-
join_preserves_left_rows,
|
|
29
|
-
stacks_duplicate_rows,
|
|
30
|
-
)
|
|
28
|
+
from trilogy.core.processing.grain_utility import rows_identity_at
|
|
31
29
|
from trilogy.utility import append_new, assume_unique
|
|
32
30
|
|
|
33
31
|
# The child must be pure scalar transforms so its GROUP BY is vacuous
|
|
@@ -67,6 +65,34 @@ def _drops_dedup_measure(cte: CTE, parent: CTE) -> bool:
|
|
|
67
65
|
return False
|
|
68
66
|
|
|
69
67
|
|
|
68
|
+
def _drops_planned_collapse(cte: CTE, parent: CTE) -> bool:
|
|
69
|
+
"""The parent collapses a filter to its grain (`MAX(CASE ...)`) that the
|
|
70
|
+
child's grain would not: the fused CTE carries the parent's stamp
|
|
71
|
+
(`CTE.collapsed_filters`) to a grain that drops the filter's keys, where
|
|
72
|
+
the collapse answers one value for many rows."""
|
|
73
|
+
grain = set(cte.grain.components)
|
|
74
|
+
return any(
|
|
75
|
+
parent.filter_collapses_to_grain(c) and not collapses_at(c, grain)
|
|
76
|
+
for c in parent.output_columns
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _restamped_collapses(cte: CTE, parent: CTE) -> frozenset[str]:
|
|
81
|
+
"""The merged CTE's collapses at the child's grain: the child's own, and
|
|
82
|
+
the parent's that still collapse there. One that does not passed
|
|
83
|
+
`_drops_planned_collapse` elided, every row passing its predicate, so it is
|
|
84
|
+
a group key; kept, the stamp outlived the WHERE that elided it, which
|
|
85
|
+
pushdown can move below, and the filter collapsed at its own grain to one
|
|
86
|
+
row (`Filters.set_dedup_keeps_its_group`, 539591)."""
|
|
87
|
+
grain = set(cte.grain.components)
|
|
88
|
+
kept = {
|
|
89
|
+
c.address
|
|
90
|
+
for c in parent.output_columns
|
|
91
|
+
if c.address in parent.collapsed and collapses_at(c, grain)
|
|
92
|
+
}
|
|
93
|
+
return frozenset(kept) | cte.collapsed
|
|
94
|
+
|
|
95
|
+
|
|
70
96
|
def _is_child_ineligible(concept: BuildConcept, cte: CTE, parent: CTE) -> bool:
|
|
71
97
|
if concept.derivation not in CHILD_INELIGIBLE_DERIVATIONS:
|
|
72
98
|
return False
|
|
@@ -89,18 +115,9 @@ def _identity_group_single_use_aggregate(cte: CTE, parent: CTE) -> bool:
|
|
|
89
115
|
for source in parent.source.datasources
|
|
90
116
|
if source.identifier not in right_ids
|
|
91
117
|
]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# at its declared grain; a union stack is not.
|
|
96
|
-
if stacks_duplicate_rows(roots[0]):
|
|
97
|
-
return False
|
|
98
|
-
if not set(roots[0].grain.components) <= set(parent.grain.components):
|
|
99
|
-
return False
|
|
100
|
-
if any(
|
|
101
|
-
not isinstance(join, Join) or not join_preserves_left_rows(join)
|
|
102
|
-
for join in parent.joins
|
|
103
|
-
):
|
|
118
|
+
# the planner's identity proof (`is_identity_group`); a declared grain
|
|
119
|
+
# alone is not one (a list's repeated element pairs its row twice)
|
|
120
|
+
if len(roots) != 1 or not rows_identity_at(roots[0], parent.joins, parent.grain):
|
|
104
121
|
return False
|
|
105
122
|
parent_outputs = output_addresses(parent)
|
|
106
123
|
input_counts: Counter[str] = Counter()
|
|
@@ -217,6 +234,12 @@ class MergeIrrelevantGroupBy(OptimizationRule):
|
|
|
217
234
|
)
|
|
218
235
|
return False, None
|
|
219
236
|
|
|
237
|
+
if _drops_planned_collapse(cte, parent):
|
|
238
|
+
self.debug(
|
|
239
|
+
f"CTE {cte.name}'s grain drops a filter {parent.name} collapses, skipping"
|
|
240
|
+
)
|
|
241
|
+
return False, None
|
|
242
|
+
|
|
220
243
|
if not parent_has_aggregate and _drops_dedup_measure(cte, parent):
|
|
221
244
|
self.debug(
|
|
222
245
|
f"CTE {cte.name} aggregates a measure {parent.name} deduplicates on, skipping"
|
|
@@ -243,7 +266,9 @@ class MergeIrrelevantGroupBy(OptimizationRule):
|
|
|
243
266
|
if x.address not in parent.source_map:
|
|
244
267
|
parent.source_map[x.address] = []
|
|
245
268
|
|
|
269
|
+
collapsed = _restamped_collapses(cte, parent)
|
|
246
270
|
carry_child_state(parent, cte)
|
|
271
|
+
parent.collapsed_filters = collapsed
|
|
247
272
|
|
|
248
273
|
# The child's output_columns already carry the hidden group-by keys,
|
|
249
274
|
# so the GROUP BY survives the swap.
|
|
@@ -128,7 +128,9 @@ def _parent_covers_condition(parent: CTE | UnionCTE, condition) -> bool:
|
|
|
128
128
|
# Transitive hop: the parent may merely pass through rows an ancestor
|
|
129
129
|
# already filtered (a join CTE reading a HAVING-filtered group). Every
|
|
130
130
|
# source of every referenced column must be a covering, non-NULL-padded
|
|
131
|
-
# ancestor
|
|
131
|
+
# ancestor, and one: values read off two ancestors met on a row neither
|
|
132
|
+
# tested (`min(x) by city` off one group, `min(x) by species` off another,
|
|
133
|
+
# paired by an ungated row stream: `Filters.paired_values_passed_apart`).
|
|
132
134
|
if not isinstance(condition, BuildConceptArgs):
|
|
133
135
|
return False
|
|
134
136
|
grandparents = {p.name: p for p in parent.dependency_nodes()}
|
|
@@ -138,7 +140,7 @@ def _parent_covers_condition(parent: CTE | UnionCTE, condition) -> bool:
|
|
|
138
140
|
if not sources or not all(s in grandparents for s in sources):
|
|
139
141
|
return False
|
|
140
142
|
needed.update(sources)
|
|
141
|
-
if
|
|
143
|
+
if len(needed) != 1:
|
|
142
144
|
return False
|
|
143
145
|
return all(
|
|
144
146
|
not _parent_nullable_in_cte(parent, name)
|
|
@@ -100,7 +100,10 @@ def carry_child_state(parent: CTE, cte: CTE) -> None:
|
|
|
100
100
|
rows, the stream that repeats their counted keys. LIMIT is the last
|
|
101
101
|
logical operation of a SELECT, so the child's limit and ORDER BY apply
|
|
102
102
|
unchanged to the merged CTE. Grouping sets: the child's aggregates now
|
|
103
|
-
render on the parent, so the pass they run in does too.
|
|
103
|
+
render on the parent, so the pass they run in does too. Collapsed
|
|
104
|
+
filters: the child's columns now render on the parent, collapsed as the
|
|
105
|
+
child's plan decided (`CTE.collapsed_filters`)."""
|
|
106
|
+
parent.collapsed_filters = parent.collapsed | cte.collapsed
|
|
104
107
|
if cte.grouping_sets is not None:
|
|
105
108
|
parent.grouping_sets = cte.grouping_sets
|
|
106
109
|
parent.distinct_counts = parent.distinct_counts | cte.distinct_counts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import math
|
|
4
|
-
from collections.abc import Mapping
|
|
4
|
+
from collections.abc import Mapping, Sequence
|
|
5
5
|
from datetime import date, datetime, timedelta
|
|
6
6
|
from decimal import Decimal
|
|
7
7
|
from enum import Enum
|
|
@@ -35,6 +35,7 @@ from trilogy.core.models.build import (
|
|
|
35
35
|
BuildSubselectComparison,
|
|
36
36
|
BuildWhereClause,
|
|
37
37
|
BuildWindowItem,
|
|
38
|
+
is_grain_pinned,
|
|
38
39
|
)
|
|
39
40
|
from trilogy.core.models.core import (
|
|
40
41
|
ArrayType,
|
|
@@ -1140,12 +1141,20 @@ def concepts_implied_non_null(value: object, per_group: bool = False) -> set[str
|
|
|
1140
1141
|
):
|
|
1141
1142
|
return set()
|
|
1142
1143
|
addresses: set[str] = set()
|
|
1143
|
-
for arg in value
|
|
1144
|
+
for arg in _strict_arguments(value):
|
|
1144
1145
|
addresses |= concepts_implied_non_null(arg, per_group)
|
|
1145
1146
|
return addresses
|
|
1146
1147
|
return set()
|
|
1147
1148
|
|
|
1148
1149
|
|
|
1150
|
+
def _strict_arguments(value: BuildFunction) -> Sequence[object]:
|
|
1151
|
+
"""A pinned value is its expression evaluated on the select's row: its
|
|
1152
|
+
anchors say where, and a row padded on one still evaluates it (`grain_pin`)."""
|
|
1153
|
+
if is_grain_pinned(value):
|
|
1154
|
+
return value.arguments[:1]
|
|
1155
|
+
return value.arguments
|
|
1156
|
+
|
|
1157
|
+
|
|
1149
1158
|
def _non_null_or_disjuncts(
|
|
1150
1159
|
atom: BoolExpr,
|
|
1151
1160
|
) -> list[BoolExpr]:
|
|
@@ -297,8 +297,8 @@ def lineage_proofs(node: StrategyNode, addresses: frozenset[str]) -> frozenset[s
|
|
|
297
297
|
def _evaluated_at_a_grain(value: object) -> bool:
|
|
298
298
|
"""A grouped value is read at its anchors' grain, not off the row
|
|
299
299
|
computing it: its anchor is not this row's column. A pinned value is
|
|
300
|
-
(`grain_pin`)
|
|
301
|
-
|
|
300
|
+
evaluated on this row (`grain_pin`), and proves what its expression
|
|
301
|
+
does."""
|
|
302
302
|
if isinstance(value, BuildParenthetical):
|
|
303
303
|
return _evaluated_at_a_grain(value.content)
|
|
304
304
|
if not isinstance(value, BuildFunction):
|
|
@@ -1276,18 +1276,20 @@ def unique_at_declared_grain(source: GrainSource) -> bool:
|
|
|
1276
1276
|
)
|
|
1277
1277
|
|
|
1278
1278
|
|
|
1279
|
-
def
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1279
|
+
def rows_identity_at(
|
|
1280
|
+
root: GrainSource,
|
|
1281
|
+
joins: Iterable[SourceJoin | UnnestJoin],
|
|
1282
|
+
target_grain: BuildGrain,
|
|
1283
|
+
) -> bool:
|
|
1284
|
+
"""``root``'s rows, joined only to lookups, are already one per
|
|
1285
|
+
``target_grain``: grouping them there keeps every row. An abstract grain
|
|
1286
|
+
is no grain: an ungrained source's keys need not be unique together."""
|
|
1287
|
+
return (
|
|
1288
|
+
not root.grain.abstract
|
|
1289
|
+
and unique_at_declared_grain(root)
|
|
1290
|
+
and set(root.grain.components) <= set(target_grain.components)
|
|
1291
|
+
and _only_lookup_joins(joins)
|
|
1292
|
+
)
|
|
1291
1293
|
|
|
1292
1294
|
|
|
1293
1295
|
def is_identity_group(
|
|
@@ -1308,12 +1310,7 @@ def is_identity_group(
|
|
|
1308
1310
|
roots = [source for source in datasets if source.identifier not in right_ids]
|
|
1309
1311
|
if len(roots) != 1:
|
|
1310
1312
|
return False
|
|
1311
|
-
|
|
1312
|
-
if not unique_at_declared_grain(root):
|
|
1313
|
-
return False
|
|
1314
|
-
if not set(root.grain.components) <= set(target_grain.components):
|
|
1315
|
-
return False
|
|
1316
|
-
if not _only_lookup_joins(joins):
|
|
1313
|
+
if not rows_identity_at(roots[0], joins, target_grain):
|
|
1317
1314
|
return False
|
|
1318
1315
|
supplied = {
|
|
1319
1316
|
concept.address for source in datasets for concept in source.output_concepts
|
|
@@ -59,13 +59,20 @@ from trilogy.core.processing.node_generators.select_node import root_is_unsource
|
|
|
59
59
|
from trilogy.utility import UniqueList, unique
|
|
60
60
|
|
|
61
61
|
from .constants import (
|
|
62
|
+
AGGREGATING_DERIVATIONS,
|
|
62
63
|
IN_SET_PLAN,
|
|
63
64
|
REPEAT_BLIND_AGGREGATES,
|
|
64
65
|
ROW_SHAPE_BARRIER_DERIVATIONS,
|
|
65
66
|
DepthLabel,
|
|
66
67
|
EdgeKind,
|
|
67
68
|
)
|
|
68
|
-
from .edges import
|
|
69
|
+
from .edges import (
|
|
70
|
+
EdgeMap,
|
|
71
|
+
add_edge,
|
|
72
|
+
edge_kind,
|
|
73
|
+
lineage_predecessors,
|
|
74
|
+
lineage_subgraph,
|
|
75
|
+
)
|
|
69
76
|
from .functional_dependency import (
|
|
70
77
|
concept_attr_fd_closure,
|
|
71
78
|
minimize_build_grain,
|
|
@@ -1739,6 +1746,45 @@ def _total_beside_a_set(
|
|
|
1739
1746
|
)
|
|
1740
1747
|
|
|
1741
1748
|
|
|
1749
|
+
def _windows_off_gate_keys(
|
|
1750
|
+
graph: nx.DiGraph, edges: EdgeMap, attrs: dict[str, ConceptAttrs], src: str
|
|
1751
|
+
) -> bool:
|
|
1752
|
+
"""A window the WHERE constrains numbers groups its grain names: where
|
|
1753
|
+
that grain does not determine the gate's keys, nothing pairs the gate
|
|
1754
|
+
with them, so it gates the rows the window reads
|
|
1755
|
+
(`Filters.window_off_gate_keys_reads_gated_rows`)."""
|
|
1756
|
+
keys = attrs[src].grain_components - {ALL_ROWS_ADDRESS}
|
|
1757
|
+
return bool(keys) and any(
|
|
1758
|
+
attrs[succ].derivation == Derivation.WINDOW
|
|
1759
|
+
and edge_kind(edges, src, succ) == EdgeKind.CONSTRAINT
|
|
1760
|
+
and not keys
|
|
1761
|
+
<= concept_attr_fd_closure(
|
|
1762
|
+
attrs, attrs[succ].grain_components, include_empty_grain=False
|
|
1763
|
+
)
|
|
1764
|
+
for succ in graph.successors(src)
|
|
1765
|
+
)
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
def _reads_an_aggregate(
|
|
1769
|
+
graph: nx.DiGraph, edges: EdgeMap, attrs: dict[str, ConceptAttrs], node: str
|
|
1770
|
+
) -> bool:
|
|
1771
|
+
"""`node` reads a grouped value: its rows are that group's, which the gate
|
|
1772
|
+
reaches as a barrier of its own. A filter is a value of each row, whatever
|
|
1773
|
+
its condition reads."""
|
|
1774
|
+
seen: set[str] = set()
|
|
1775
|
+
stack = lineage_predecessors(graph, edges, node)
|
|
1776
|
+
while stack:
|
|
1777
|
+
cur = stack.pop()
|
|
1778
|
+
if cur in seen or cur not in attrs:
|
|
1779
|
+
continue
|
|
1780
|
+
seen.add(cur)
|
|
1781
|
+
if attrs[cur].derivation in AGGREGATING_DERIVATIONS:
|
|
1782
|
+
return True
|
|
1783
|
+
if attrs[cur].derivation != Derivation.FILTER:
|
|
1784
|
+
stack.extend(lineage_predecessors(graph, edges, cur))
|
|
1785
|
+
return False
|
|
1786
|
+
|
|
1787
|
+
|
|
1742
1788
|
def _barrier_at_gate_grain(
|
|
1743
1789
|
graph: nx.DiGraph,
|
|
1744
1790
|
attrs: dict[str, ConceptAttrs],
|
|
@@ -1761,6 +1807,25 @@ def _barrier_at_gate_grain(
|
|
|
1761
1807
|
)
|
|
1762
1808
|
|
|
1763
1809
|
|
|
1810
|
+
def _groups_rows(
|
|
1811
|
+
graph: nx.DiGraph,
|
|
1812
|
+
edges: EdgeMap,
|
|
1813
|
+
attrs: dict[str, ConceptAttrs],
|
|
1814
|
+
node: str,
|
|
1815
|
+
environment: BuildEnvironment,
|
|
1816
|
+
) -> bool:
|
|
1817
|
+
"""An output that is, filters or reads a grouped value (351815, 218754)."""
|
|
1818
|
+
if attrs[node].derivation in AGGREGATING_DERIVATIONS:
|
|
1819
|
+
return True
|
|
1820
|
+
lineage = environment.concepts[attrs[node].address].lineage
|
|
1821
|
+
if isinstance(lineage, BuildFilterItem):
|
|
1822
|
+
return (
|
|
1823
|
+
isinstance(lineage.content, BuildConcept)
|
|
1824
|
+
and lineage.content.derivation in AGGREGATING_DERIVATIONS
|
|
1825
|
+
)
|
|
1826
|
+
return _reads_an_aggregate(graph, edges, attrs, node)
|
|
1827
|
+
|
|
1828
|
+
|
|
1764
1829
|
def _shown_filter_contents(
|
|
1765
1830
|
shown: Collection[str],
|
|
1766
1831
|
attrs: dict[str, ConceptAttrs],
|
|
@@ -3111,6 +3176,18 @@ def build_concept_graph(
|
|
|
3111
3176
|
)
|
|
3112
3177
|
}
|
|
3113
3178
|
backfill += sorted(through_condition)
|
|
3179
|
+
# a window over the select's own groups, or beside a value read off them,
|
|
3180
|
+
# numbers those, not rows
|
|
3181
|
+
off_gate_keys = [
|
|
3182
|
+
src
|
|
3183
|
+
for src in eligible
|
|
3184
|
+
if src not in backfill and _windows_off_gate_keys(graph, edges, attrs, src)
|
|
3185
|
+
]
|
|
3186
|
+
if off_gate_keys and not any(
|
|
3187
|
+
n in attrs and _groups_rows(graph, edges, attrs, n, environment)
|
|
3188
|
+
for n in mandatory_blank_ids
|
|
3189
|
+
):
|
|
3190
|
+
backfill += sorted(off_gate_keys)
|
|
3114
3191
|
# a constant is the same value on every row: the rowed outputs carry a
|
|
3115
3192
|
# condition its grain has no key for, which it would join on no key (`4`
|
|
3116
3193
|
# at `big, city` beside `min(height) by species`). Constrained by some of
|