pytrilogy 0.3.548__tar.gz → 0.3.549__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.
Files changed (459) hide show
  1. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/PKG-INFO +1 -1
  2. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/__init__.py +1 -1
  3. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/fingerprint.py +1 -0
  4. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/datasource.py +29 -5
  5. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/execute.py +4 -3
  6. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/join_resolution.py +104 -34
  7. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/condition_placement.py +7 -5
  8. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/join_plan.py +33 -1
  9. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/strategy_builder.py +6 -0
  10. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/duckdb.py +45 -28
  11. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/source_pushdown.py +4 -4
  12. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/snapshot.py +6 -2
  13. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/render.py +8 -4
  14. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/trilogy.lark +3 -1
  15. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/datasource_rules.py +41 -0
  16. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/syntax.py +2 -0
  17. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/Cargo.lock +1 -1
  18. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/Cargo.toml +1 -1
  19. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/parser.rs +24 -2
  20. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/trilogy.pest +3 -1
  21. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/.scripts/__init__.py +0 -0
  22. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/.scripts/build_backend.py +0 -0
  23. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/.scripts/sync_version.py +0 -0
  24. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/LICENSE.md +0 -0
  25. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/README.md +0 -0
  26. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/pyproject.toml +0 -0
  27. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/README.md +0 -0
  28. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/__init__.py +0 -0
  29. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/constants.py +0 -0
  30. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/conversation.py +0 -0
  31. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/enums.py +0 -0
  32. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/execute.py +0 -0
  33. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/models.py +0 -0
  34. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/prompts.py +0 -0
  35. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/__init__.py +0 -0
  36. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/anthropic.py +0 -0
  37. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/base.py +0 -0
  38. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/deepseek.py +0 -0
  39. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/google.py +0 -0
  40. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/openai.py +0 -0
  41. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/openrouter.py +0 -0
  42. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/providers/utils.py +0 -0
  43. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/ai/syntax_examples.py +0 -0
  44. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/authoring/README.md +0 -0
  45. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/authoring/__init__.py +0 -0
  46. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/constants.py +0 -0
  47. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/README.md +0 -0
  48. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/__init__.py +0 -0
  49. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/assertions.py +0 -0
  50. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/average_parts.py +0 -0
  51. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/casts.py +0 -0
  52. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/constants.py +0 -0
  53. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/domain_graph.py +0 -0
  54. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/domain_validation.py +0 -0
  55. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/enums.py +0 -0
  56. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/env_processor.py +0 -0
  57. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/environment_helpers.py +0 -0
  58. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/ergonomics.py +0 -0
  59. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/exceptions.py +0 -0
  60. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/functions.py +0 -0
  61. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/grain_pin.py +0 -0
  62. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/graph.py +0 -0
  63. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/graph_models.py +0 -0
  64. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/having_normalization.py +0 -0
  65. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/internal.py +0 -0
  66. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/like_patterns.py +0 -0
  67. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/__init__.py +0 -0
  68. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/author.py +0 -0
  69. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/build.py +0 -0
  70. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/build_environment.py +0 -0
  71. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/copying.py +0 -0
  72. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/core.py +0 -0
  73. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/environment.py +0 -0
  74. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/keyspace.py +0 -0
  75. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/models/reference_index.py +0 -0
  76. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimization.py +0 -0
  77. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/__init__.py +0 -0
  78. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/atom_contract.py +0 -0
  79. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/base_optimization.py +0 -0
  80. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/collapse_single_parent.py +0 -0
  81. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/existence_having_fold.py +0 -0
  82. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/filtered_aggregate.py +0 -0
  83. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/full_join_lowering.py +0 -0
  84. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/hide_unused_concept.py +0 -0
  85. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/identity_group.py +0 -0
  86. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/inline_datasource.py +0 -0
  87. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/join_hoist.py +0 -0
  88. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/merge_irrelevant_group_by.py +0 -0
  89. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/merge_twin_scans.py +0 -0
  90. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/null_safe_join.py +0 -0
  91. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/order_inner_joins.py +0 -0
  92. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/predicate_pushdown.py +0 -0
  93. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/preserved_join_keys.py +0 -0
  94. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/reuse_parent_lookup.py +0 -0
  95. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/semi_join_pushdown.py +0 -0
  96. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/strip_redundant_not_null.py +0 -0
  97. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/union_dim_pushdown.py +0 -0
  98. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/utils.py +0 -0
  99. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/optimizations/value_set_join_upgrade.py +0 -0
  100. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/README.md +0 -0
  101. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/__init__.py +0 -0
  102. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/aggregate_rollup.py +0 -0
  103. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/basic_graph.py +0 -0
  104. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/concept_strategies_v4.py +0 -0
  105. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/condition_utility.py +0 -0
  106. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/constants.py +0 -0
  107. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/consumer_proofs.py +0 -0
  108. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/discovery_utility.py +0 -0
  109. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/discovery_validation.py +0 -0
  110. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/grain_utility.py +0 -0
  111. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/join_key_groups.py +0 -0
  112. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/model_ambiguity.py +0 -0
  113. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/__init__.py +0 -0
  114. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/common.py +0 -0
  115. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/presence_probe.py +0 -0
  116. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_helpers/__init__.py +0 -0
  117. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_helpers/condition_routing.py +0 -0
  118. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_helpers/datasource_injection.py +0 -0
  119. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_helpers/datasource_nodes.py +0 -0
  120. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_helpers/source_scoring.py +0 -0
  121. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_merge_node.py +0 -0
  122. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/node_generators/select_node.py +0 -0
  123. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/README.md +0 -0
  124. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/__init__.py +0 -0
  125. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/base_node.py +0 -0
  126. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/filter_node.py +0 -0
  127. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/group_node.py +0 -0
  128. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/merge_node.py +0 -0
  129. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/recursive_node.py +0 -0
  130. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/select_node_v2.py +0 -0
  131. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/subselect_node.py +0 -0
  132. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/union_node.py +0 -0
  133. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/unnest_node.py +0 -0
  134. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/nodes/window_node.py +0 -0
  135. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/null_provenance.py +0 -0
  136. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/partial_bridging.py +0 -0
  137. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/plan_trace.py +0 -0
  138. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/plan_trace_model.py +0 -0
  139. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/relation_rollup.py +0 -0
  140. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/scan_partials.py +0 -0
  141. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/source_dominance.py +0 -0
  142. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/statement_scope.py +0 -0
  143. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/utility.py +0 -0
  144. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/__init__.py +0 -0
  145. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/concept_graph.py +0 -0
  146. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/condition_injection.py +0 -0
  147. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/constants.py +0 -0
  148. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/edges.py +0 -0
  149. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/extent_ownership.py +0 -0
  150. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/final_cover.py +0 -0
  151. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/functional_dependency.py +0 -0
  152. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/group_behaviors.py +0 -0
  153. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/group_graph.py +0 -0
  154. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/group_rules.py +0 -0
  155. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/history.py +0 -0
  156. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/keyspace.py +0 -0
  157. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/models.py +0 -0
  158. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_build.py +0 -0
  159. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_coalescing.py +0 -0
  160. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_model.py +0 -0
  161. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_obligations.py +0 -0
  162. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_search.py +0 -0
  163. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/network_topology.py +0 -0
  164. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/projection.py +0 -0
  165. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/region_domains.py +0 -0
  166. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/region_reads.py +0 -0
  167. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/renders.py +0 -0
  168. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/root_partition.py +0 -0
  169. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/source_planning.py +0 -0
  170. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/staged_where.py +0 -0
  171. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_helper/union_arms.py +0 -0
  172. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/__init__.py +0 -0
  173. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/aggregate.py +0 -0
  174. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/basic.py +0 -0
  175. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/common.py +0 -0
  176. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/condition_sources.py +0 -0
  177. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/constant.py +0 -0
  178. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/dispatch.py +0 -0
  179. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/filter.py +0 -0
  180. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/group_to.py +0 -0
  181. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/multiselect.py +0 -0
  182. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/nested_select.py +0 -0
  183. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/recursive.py +0 -0
  184. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/rollup_select.py +0 -0
  185. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/root.py +0 -0
  186. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/rowset.py +0 -0
  187. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/rowset_witness.py +0 -0
  188. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/subselect.py +0 -0
  189. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/union.py +0 -0
  190. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/union_select.py +0 -0
  191. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/unnest.py +0 -0
  192. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/processing/v4_node_generators/window.py +0 -0
  193. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/query_processor.py +0 -0
  194. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/scope_diagnostics.py +0 -0
  195. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/README.md +0 -0
  196. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/__init__.py +0 -0
  197. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/author.py +0 -0
  198. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/build.py +0 -0
  199. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/common.py +0 -0
  200. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/statements/execute.py +0 -0
  201. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/table_processor.py +0 -0
  202. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/union_find.py +0 -0
  203. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/utility.py +0 -0
  204. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/README.md +0 -0
  205. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/__init__.py +0 -0
  206. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/common.py +0 -0
  207. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/concept.py +0 -0
  208. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/datasource.py +0 -0
  209. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/environment.py +0 -0
  210. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/fix.py +0 -0
  211. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/validation/rows.py +0 -0
  212. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/core/where_scope_normalization.py +0 -0
  213. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/__init__.py +0 -0
  214. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/base.py +0 -0
  215. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/bigquery.py +0 -0
  216. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/bigquery_engine.py +0 -0
  217. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/bigquery_persist.py +0 -0
  218. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/bigquery_staging.py +0 -0
  219. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/cancel.py +0 -0
  220. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/clickhouse.py +0 -0
  221. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/clickhouse_chdb.py +0 -0
  222. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/common.py +0 -0
  223. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/config.py +0 -0
  224. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/databricks.py +0 -0
  225. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/dataframe.py +0 -0
  226. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/duckdb_pool.py +0 -0
  227. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/duckdb_uv.py +0 -0
  228. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/duckdb_vgi.py +0 -0
  229. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/enums.py +0 -0
  230. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/haybarn_engine.py +0 -0
  231. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/join_barriers.py +0 -0
  232. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/metadata.py +0 -0
  233. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/mock.py +0 -0
  234. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/mock_pattern.py +0 -0
  235. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/mysql.py +0 -0
  236. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/postgres.py +0 -0
  237. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/presto.py +0 -0
  238. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/python_source.py +0 -0
  239. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/results.py +0 -0
  240. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/snowflake.py +0 -0
  241. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/sql_server.py +0 -0
  242. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/sqlite.py +0 -0
  243. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/dialect/table_function.py +0 -0
  244. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/engine.py +0 -0
  245. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/__init__.py +0 -0
  246. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/assertions.py +0 -0
  247. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/client_copy.py +0 -0
  248. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/config.py +0 -0
  249. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/envs.py +0 -0
  250. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/model_fingerprint.py +0 -0
  251. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/outputs.py +0 -0
  252. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/report.py +0 -0
  253. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/staged_write.py +0 -0
  254. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/AGENTS.md +0 -0
  255. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/CLAUDE.md +0 -0
  256. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/__init__.py +0 -0
  257. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/cache.py +0 -0
  258. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/declaration.py +0 -0
  259. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/exceptions.py +0 -0
  260. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/isolation.py +0 -0
  261. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/partitions.py +0 -0
  262. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/persistence.py +0 -0
  263. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/phases.py +0 -0
  264. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/state_store.py +0 -0
  265. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/state/watermarks.py +0 -0
  266. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/execution/write_order.py +0 -0
  267. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/executor.py +0 -0
  268. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/hooks/__init__.py +0 -0
  269. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/hooks/base_hook.py +0 -0
  270. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/hooks/graph_hook.py +0 -0
  271. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/hooks/query_debugger.py +0 -0
  272. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/__init__.py +0 -0
  273. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/adapters.py +0 -0
  274. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/arrow.py +0 -0
  275. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/click_support.py +0 -0
  276. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/contract.py +0 -0
  277. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/describe.py +0 -0
  278. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/errors.py +0 -0
  279. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/runner.py +0 -0
  280. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/sinks.py +0 -0
  281. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/io/vgi.py +0 -0
  282. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/metadata/__init__.py +0 -0
  283. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parser.py +0 -0
  284. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/README.md +0 -0
  285. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/__init__.py +0 -0
  286. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/common.py +0 -0
  287. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/exceptions.py +0 -0
  288. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/helpers.py +0 -0
  289. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/parse_engine_v2.py +0 -0
  290. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/pretty.py +0 -0
  291. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/README.md +0 -0
  292. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/__init__.py +0 -0
  293. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/concept_syntax.py +0 -0
  294. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/errors.py +0 -0
  295. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/function_syntax.py +0 -0
  296. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/hydration.py +0 -0
  297. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/import_service.py +0 -0
  298. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/lark_backend.py +0 -0
  299. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/model.py +0 -0
  300. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/pest_backend.py +0 -0
  301. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rowset_semantics.py +0 -0
  302. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/__init__.py +0 -0
  303. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/chart_rules.py +0 -0
  304. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/concept_rules.py +0 -0
  305. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/conditional_rules.py +0 -0
  306. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/expression_rules.py +0 -0
  307. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/function_definition_rules.py +0 -0
  308. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/function_rules.py +0 -0
  309. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/import_rules.py +0 -0
  310. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/merge_rules.py +0 -0
  311. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/multiselect_rules.py +0 -0
  312. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/operational_rules.py +0 -0
  313. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/order_rules.py +0 -0
  314. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/persist_rules.py +0 -0
  315. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/rawsql_rules.py +0 -0
  316. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/rollup_lift.py +0 -0
  317. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/rowset_rules.py +0 -0
  318. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/select_rules.py +0 -0
  319. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/select_statement_rules.py +0 -0
  320. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/statement_rules.py +0 -0
  321. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/subselect_rules.py +0 -0
  322. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/token_rules.py +0 -0
  323. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/tvf_rules.py +0 -0
  324. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules/type_rules.py +0 -0
  325. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/rules_context.py +0 -0
  326. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/select_finalize.py +0 -0
  327. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/semantic_scope.py +0 -0
  328. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/semantic_state.py +0 -0
  329. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/statement_planner.py +0 -0
  330. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/statement_plans.py +0 -0
  331. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/parsing/v2/symbols.py +0 -0
  332. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/py.typed +0 -0
  333. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/render.py +0 -0
  334. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/__init__.py +0 -0
  335. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/altair_renderer.py +0 -0
  336. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/base.py +0 -0
  337. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/chart_theme.py +0 -0
  338. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/rich_types.py +0 -0
  339. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/terminal_renderer.py +0 -0
  340. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/rendering/theme.py +0 -0
  341. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/__init__.py +0 -0
  342. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/backends/__init__.py +0 -0
  343. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/backends/base.py +0 -0
  344. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/backends/html.py +0 -0
  345. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/backends/png.py +0 -0
  346. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/charts.py +0 -0
  347. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/document.py +0 -0
  348. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/runner.py +0 -0
  349. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/report/tables.py +0 -0
  350. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/AGENTS.md +0 -0
  351. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/CLAUDE.md +0 -0
  352. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/README.md +0 -0
  353. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/__init__.py +0 -0
  354. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent.py +0 -0
  355. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_info.py +0 -0
  356. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_info_docs/__init__.py +0 -0
  357. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_info_docs/cli.py +0 -0
  358. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_info_docs/content.py +0 -0
  359. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_info_docs/directory.py +0 -0
  360. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_render.py +0 -0
  361. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_sessions.py +0 -0
  362. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_sql_tools.py +0 -0
  363. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/agent_tools.py +0 -0
  364. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/click_utils.py +0 -0
  365. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/cloud.py +0 -0
  366. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/cloud_models.py +0 -0
  367. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/common.py +0 -0
  368. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/database.py +0 -0
  369. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/README.md +0 -0
  370. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/build.sh +0 -0
  371. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/examples/basic_usage.rs +0 -0
  372. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/directory_resolver.rs +0 -0
  373. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/graph.rs +0 -0
  374. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/lib.rs +0 -0
  375. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/main.rs +0 -0
  376. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/network_search.rs +0 -0
  377. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/python_bindings.rs +0 -0
  378. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/resolver.rs +0 -0
  379. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/src/trilogy_parser.rs +0 -0
  380. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/base.preql +0 -0
  381. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/cli_integration.rs +0 -0
  382. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/customer.preql +0 -0
  383. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/main.preql +0 -0
  384. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/nesting_limit.rs +0 -0
  385. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/orders.preql +0 -0
  386. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/parse_cost.rs +0 -0
  387. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/public_api.rs +0 -0
  388. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/test_data/base.preql +0 -0
  389. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency/tests/test_data/consumer.preql +0 -0
  390. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/dependency.py +0 -0
  391. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display.py +0 -0
  392. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_core.py +0 -0
  393. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_execution.py +0 -0
  394. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_ingest.py +0 -0
  395. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_init.py +0 -0
  396. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_models.py +0 -0
  397. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_parallel.py +0 -0
  398. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_refresh.py +0 -0
  399. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/display_validation.py +0 -0
  400. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/env_commands.py +0 -0
  401. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/environment.py +0 -0
  402. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/explore.py +0 -0
  403. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/explore_seen.py +0 -0
  404. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/file.py +0 -0
  405. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/file_helpers/__init__.py +0 -0
  406. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/file_helpers/backends.py +0 -0
  407. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/file_helpers/preql_description.py +0 -0
  408. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/file_helpers/preql_validation.py +0 -0
  409. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/fmt.py +0 -0
  410. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest.py +0 -0
  411. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/__init__.py +0 -0
  412. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/fk_inference.py +0 -0
  413. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/foreign_keys.py +0 -0
  414. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/formatting.py +0 -0
  415. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/introspection.py +0 -0
  416. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/ingest_helpers/typing.py +0 -0
  417. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/init.py +0 -0
  418. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/parallel_execution.py +0 -0
  419. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/plan.py +0 -0
  420. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/project_config.py +0 -0
  421. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/public.py +0 -0
  422. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/refresh.py +0 -0
  423. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/render.py +0 -0
  424. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/run.py +0 -0
  425. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve.py +0 -0
  426. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/__init__.py +0 -0
  427. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/connection_spec.py +0 -0
  428. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/file_discovery.py +0 -0
  429. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/index_generation.py +0 -0
  430. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/jobs.py +0 -0
  431. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/mcp_server.py +0 -0
  432. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/models.py +0 -0
  433. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/state_cache.py +0 -0
  434. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/state_computation.py +0 -0
  435. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/serve_helpers/studio_bundle.py +0 -0
  436. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/single_execution.py +0 -0
  437. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/source.py +0 -0
  438. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/source_identity.py +0 -0
  439. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/state.py +0 -0
  440. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/testing.py +0 -0
  441. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/trilogy.py +0 -0
  442. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/scripts/validate_agent.py +0 -0
  443. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/staging.py +0 -0
  444. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/__init__.py +0 -0
  445. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/bytes.preql +0 -0
  446. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/chart.preql +0 -0
  447. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/collection.preql +0 -0
  448. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/color.preql +0 -0
  449. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/currency.preql +0 -0
  450. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/date.preql +0 -0
  451. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/display.preql +0 -0
  452. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/geography.preql +0 -0
  453. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/metric.preql +0 -0
  454. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/money.preql +0 -0
  455. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/net.preql +0 -0
  456. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/ranking.preql +0 -0
  457. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/report.preql +0 -0
  458. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/std/semantic.preql +0 -0
  459. {pytrilogy-0.3.548 → pytrilogy-0.3.549}/trilogy/utility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytrilogy
3
- Version: 0.3.548
3
+ Version: 0.3.549
4
4
  Classifier: Programming Language :: Python
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -7,7 +7,7 @@ if TYPE_CHECKING:
7
7
  from trilogy.executor import Executor
8
8
  from trilogy.parser import parse
9
9
 
10
- __version__ = "0.3.548"
10
+ __version__ = "0.3.549"
11
11
 
12
12
  __all__ = [
13
13
  "CONFIG",
@@ -193,6 +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.script_args else []),
196
197
  )
197
198
 
198
199
 
@@ -197,6 +197,11 @@ class AddressArgument:
197
197
  name: str | None = None
198
198
 
199
199
 
200
+ # Splits a program's static arguments off its path in ``safe_address``. ``|`` is
201
+ # rejected in arguments and illegal in Windows file names.
202
+ SCRIPT_ARGS_SEPARATOR = " | "
203
+
204
+
200
205
  @dataclass
201
206
  class Address:
202
207
  location: str
@@ -218,6 +223,9 @@ class Address:
218
223
  # The source a multi-source program serves (``file `x.py#name```), passed
219
224
  # to it as ``--source name``.
220
225
  source_name: str | None = None
226
+ # Static arguments a program is run with (``file `x.py` args ('a')``),
227
+ # ahead of ``--source`` and pushed-down filters.
228
+ script_args: list[str | int | float] = field(default_factory=list)
221
229
  # Set for a table-function address (``address fn(col, k := 'v')``).
222
230
  arguments: list[AddressArgument] | None = None
223
231
 
@@ -230,10 +238,21 @@ class Address:
230
238
  return [str(a.value) for a in self.arguments or [] if a.bound]
231
239
 
232
240
  @property
233
- def source_args(self) -> str:
234
- """The command line that selects this address's source of its program."""
241
+ def static_args(self) -> tuple[str, ...]:
242
+ """``script_args`` as command-line tokens. Parsing admits only values
243
+ that need no quoting (``source_pushdown.is_transport_safe``)."""
244
+ return tuple(str(a) for a in self.script_args)
245
+
246
+ @property
247
+ def source_selector(self) -> str:
248
+ """The flag choosing this address's source of a multi-source program."""
235
249
  return f"--source {self.source_name}" if self.source_name else ""
236
250
 
251
+ @property
252
+ def source_args(self) -> str:
253
+ """The command line this address runs its program with."""
254
+ return " ".join(filter(None, [*self.static_args, self.source_selector]))
255
+
237
256
  @property
238
257
  def is_query(self):
239
258
  return self.type == AddressType.QUERY
@@ -573,10 +592,15 @@ class Datasource(HasUUID, Namespaced):
573
592
  @property
574
593
  def safe_address(self) -> str:
575
594
  if isinstance(self.address, Address):
576
- # Sources of one program share its location but are distinct assets.
595
+ # Sources of one program share its location but are distinct assets,
596
+ # as are runs of it with different arguments.
597
+ address = self.address.location
577
598
  if self.address.source_name:
578
- return f"{self.address.location}#{self.address.source_name}"
579
- return self.address.location
599
+ address = f"{address}#{self.address.source_name}"
600
+ if self.address.script_args:
601
+ args = " ".join(self.address.static_args)
602
+ address = f"{address}{SCRIPT_ARGS_SEPARATOR}{args}"
603
+ return address
580
604
  return self.address
581
605
 
582
606
  def repoint(self, address: "str | Address") -> "Datasource":
@@ -2897,7 +2897,7 @@ def merge_ctes(ctes: list[CTE | UnionCTE]) -> UniqueList[CTE | UnionCTE]:
2897
2897
  def _collect_datasource_addresses(
2898
2898
  source: QueryDatasource,
2899
2899
  seen_sources: set[int],
2900
- found: dict[tuple[str, str], Address],
2900
+ found: dict[tuple[str, str, str], Address],
2901
2901
  ) -> None:
2902
2902
  if id(source) in seen_sources:
2903
2903
  return
@@ -2907,7 +2907,8 @@ def _collect_datasource_addresses(
2907
2907
  _collect_datasource_addresses(datasource, seen_sources, found)
2908
2908
  elif isinstance(datasource.address, Address):
2909
2909
  address = datasource.address
2910
- found.setdefault((address.location, address.type.value), address)
2910
+ key = (address.location, address.type.value, address.source_args)
2911
+ found.setdefault(key, address)
2911
2912
 
2912
2913
 
2913
2914
  def collect_source_addresses(ctes: Sequence[CTE | UnionCTE]) -> list[Address]:
@@ -2916,7 +2917,7 @@ def collect_source_addresses(ctes: Sequence[CTE | UnionCTE]) -> list[Address]:
2916
2917
  Used to give the dialect a chance to materialize sources the generated SQL
2917
2918
  can only reference by name (see ``BaseDialect.prepare_sources``).
2918
2919
  """
2919
- found: dict[tuple[str, str], Address] = {}
2920
+ found: dict[tuple[str, str, str], Address] = {}
2920
2921
  seen_sources: set[int] = set()
2921
2922
  for cte in ctes:
2922
2923
  _collect_datasource_addresses(cte.source, seen_sources, found)
@@ -56,6 +56,7 @@ from trilogy.core.processing.aggregate_rollup import pending_rollups
56
56
  from trilogy.core.processing.condition_utility import (
57
57
  decompose_condition,
58
58
  is_scalar_condition,
59
+ zero_rejections,
59
60
  )
60
61
  from trilogy.core.processing.join_key_groups import axis_member_keys
61
62
  from trilogy.core.processing.null_provenance import (
@@ -1642,39 +1643,10 @@ def resolve_join_order_v2(facts: JoinFacts) -> list[JoinOrderOutput]:
1642
1643
  facts.demanded_domains,
1643
1644
  {node: side.grain for node, side in facts.sides.items()},
1644
1645
  )
1645
- if facts.gated_covered:
1646
- _narrow_late_gated(output, facts)
1647
1646
  restore_full_join_providers(output)
1648
1647
  return output
1649
1648
 
1650
1649
 
1651
- def _narrow_late_gated(joins: list[JoinOrderOutput], facts: JoinFacts) -> None:
1652
- """`_narrow_gated` with a witness an INNER walked after the join: on every
1653
- row that INNER keeps, the key is the witness's. Only in a stream nothing
1654
- pads (no RIGHT or FULL join, no LEFT onto the rows), where a row the
1655
- narrowed join drops would reach every later join only to fail the WHERE.
1656
- Only a LEFT no widening made and no later join reads: narrowing it leaves
1657
- every other join's type as `ensure_content_preservation` decided."""
1658
- if any(j.type in PADS_LEFT_JOIN_TYPES for j in joins):
1659
- return
1660
- for join in joins:
1661
- if join.type != JoinType.LEFT_OUTER or join.own_type or len(join.keys) != 1:
1662
- continue
1663
- ((rows, keys),) = join.keys.items()
1664
- if any(
1665
- join.right in j.lefts or j.right == rows and j.type in PADS_RIGHT_JOIN_TYPES
1666
- for j in joins
1667
- if j is not join
1668
- ):
1669
- continue
1670
- if _gated_keys(rows, join.right, keys, True, joins, facts):
1671
- if plan_trace.active():
1672
- _trace_join_type(
1673
- rows, join.right, keys, facts, [], JoinType.INNER, "gated_late"
1674
- )
1675
- join.type = JoinType.INNER
1676
-
1677
-
1678
1650
  def _stitched(facts: JoinFacts, sides: Iterable[str], walked: set[str]) -> list[str]:
1679
1651
  """The `sides` whose stitches (`JoinFacts.stitches`) are all walked."""
1680
1652
  return [s for s in sides if facts.stitches.get(s, frozenset()) <= walked]
@@ -3547,8 +3519,10 @@ def _covered_keys(
3547
3519
  key not in sub_facts.partials
3548
3520
  and sub_concept.address == sup_concept.address
3549
3521
  ):
3550
- if _twins(key, sub, sup, sides, carries, related) or _within_stream(
3551
- key, sub, sup, sides, carries
3522
+ if (
3523
+ _twins(key, sub, sup, sides, carries, related)
3524
+ or _within_stream(key, sub, sup, sides, carries)
3525
+ or _joined_within(key, sub, sup, sides, carries)
3552
3526
  ):
3553
3527
  out.add((sub, sup, key))
3554
3528
  elif _gated_twins(key, sub, sup, sides, carries):
@@ -3697,6 +3671,85 @@ def _within_stream(
3697
3671
  )
3698
3672
 
3699
3673
 
3674
+ def _joined_within(
3675
+ key: str, sub: str, sup: str, sides: Mapping[str, SideFacts], carries: _Carries
3676
+ ) -> bool:
3677
+ """`sub`'s rows are a merge's past row filters and groups (`_merged_rows`),
3678
+ and that merge joined `sup` itself INNER on `key`, padding no row in
3679
+ after: each `sub` key is one a `sup` row matched. Its key reads a side
3680
+ the INNER equated with `sup` (`_equated_on`). A NULL group was matched
3681
+ only null-safely, so it pairs only where this pair is null-safe too
3682
+ (`_nulls_pair`). Law 326039: the gated rows beside the per-`tree_form`
3683
+ count they were gated on."""
3684
+ if key in (
3685
+ sides[sub].rollup_padded
3686
+ | sides[sup].rollup_padded
3687
+ | sides[sub].partials
3688
+ | sides[sup].partials
3689
+ ):
3690
+ return False
3691
+ merge = _merged_rows(carries.nodes[sub])
3692
+ if merge is None:
3693
+ return False
3694
+ address = carries.concepts[(sub, key)].address
3695
+ target = carries.nodes[sup].identifier
3696
+ equated = _equated_on(merge, address, target)
3697
+ providers = merge.source_map.get(address, set())
3698
+ if not equated or not providers:
3699
+ return False
3700
+ return all(
3701
+ not isinstance(p, UnnestJoin) and p.identifier in equated for p in providers
3702
+ ) and _nulls_pair(key, sub, sup, sides, carries)
3703
+
3704
+
3705
+ def _merged_rows(ds: DataSource) -> QueryDatasource | None:
3706
+ """The merge `ds` reads its rows off through wrappers that only drop or
3707
+ group rows (a filter, a group, a limit), else None."""
3708
+ while isinstance(ds, QueryDatasource):
3709
+ if ds.source_type in (SourceType.UNION, SourceType.RECURSIVE):
3710
+ return None
3711
+ if ds.joins:
3712
+ return ds if ds.source_type == SourceType.MERGE else None
3713
+ if len(ds.datasources) != 1:
3714
+ return None
3715
+ ds = ds.datasources[0]
3716
+ return None
3717
+
3718
+
3719
+ def _equated_on(merge: QueryDatasource, address: str, target: str) -> frozenset[str]:
3720
+ """The sides of `merge` an INNER join equated with `target` on `address`,
3721
+ `target` included, when it was so joined and no join after padded rows
3722
+ of the stream in; empty otherwise."""
3723
+ edges: list[set[str]] = []
3724
+ joined = False
3725
+ for join in merge.joins:
3726
+ if not isinstance(join, Join):
3727
+ return frozenset()
3728
+ if joined and join.join_type in PADS_LEFT_JOIN_TYPES:
3729
+ return frozenset()
3730
+ if join.join_type != JoinType.INNER or join.condition:
3731
+ continue
3732
+ nodes = {
3733
+ p.node.identifier
3734
+ for p in join.pairs
3735
+ if p.left.address == address and p.right.address == address
3736
+ }
3737
+ if nodes:
3738
+ edges.append(nodes | {join.right.identifier})
3739
+ joined = joined or join.right.identifier == target
3740
+ if not joined:
3741
+ return frozenset()
3742
+ equated = {target}
3743
+ grown = True
3744
+ while grown:
3745
+ grown = False
3746
+ for edge in edges:
3747
+ if edge & equated and not edge <= equated:
3748
+ equated |= edge
3749
+ grown = True
3750
+ return frozenset(equated)
3751
+
3752
+
3700
3753
  def _one_read(
3701
3754
  key: str, a: str, b: str, sides: Mapping[str, SideFacts], carries: _Carries
3702
3755
  ) -> bool:
@@ -3775,7 +3828,7 @@ def _gated_twins(
3775
3828
  }
3776
3829
  within = unfiltered.grain | unfiltered.determined
3777
3830
  if not all(map(_null_rejecting, extra)) or not all(
3778
- spelled.get(arg.address) in within
3831
+ _determined_within(arg, spelled, within)
3779
3832
  for atom in extra
3780
3833
  for arg in atom.concept_arguments
3781
3834
  ):
@@ -3796,14 +3849,31 @@ def _gated_twins(
3796
3849
  return _nulls_pair(key, rows, filtered, sides, carries)
3797
3850
 
3798
3851
 
3852
+ def _determined_within(
3853
+ arg: BuildConcept, spelled: Mapping[str, str], within: frozenset[str]
3854
+ ) -> bool:
3855
+ """`arg` is a function of columns in `within`: one of them, or an
3856
+ aggregate by keys each of which is (`count(x) by status` beside rows of
3857
+ `status`), whose one value per key the rows need not carry."""
3858
+ if spelled.get(arg.address) in within:
3859
+ return True
3860
+ keys = arg.grain.components
3861
+ return (
3862
+ arg.derivation == Derivation.AGGREGATE
3863
+ and bool(keys)
3864
+ and all(spelled.get(k) in within for k in keys)
3865
+ )
3866
+
3867
+
3799
3868
  def _null_rejecting(atom: BoolExpr) -> bool:
3800
3869
  """`atom` is false wherever an input it reads is NULL, padding included:
3801
3870
  a later join padding the rows INNER dropped cannot pass it (`amount is
3802
- null` beside an outer region would)."""
3871
+ null` beside an outer region would). A padded COUNT reads 0, so a
3872
+ comparison 0 fails rejects its padding too (`count(x) by k = 1`)."""
3803
3873
  # local import: grain_utility imports this module
3804
3874
  from trilogy.core.processing.grain_utility import non_null_proofs
3805
3875
 
3806
- proofs = non_null_proofs(atom)
3876
+ proofs = non_null_proofs(atom) | zero_rejections(atom)
3807
3877
  return all(arg.address in proofs for arg in atom.concept_arguments)
3808
3878
 
3809
3879
 
@@ -688,8 +688,10 @@ def _hosts_reading_unfiltered_rows(
688
688
  aggregate's condition `sum(x) by *` beside the root rows it is evaluated on)
689
689
  filters only the rows that value is computed from; the consumer aggregates
690
690
  the other stream, so it hosts the atom itself. So does a window numbering
691
- that stream (`windows`; `Filters.window_counts_ungated_rows`), unless the
692
- atom reads a set, which a window's input filter cannot render (240967)."""
691
+ rows, below the host or beside it (`windows`;
692
+ `Filters.window_counts_ungated_rows`, `Filters.window_beside_host_counts_ungated_rows`),
693
+ unless the atom reads a set, which a window's input filter cannot render
694
+ (240967)."""
693
695
  buckets = scope.buckets
694
696
  host_graph = scope.host_graph
695
697
  if not any(_emits_group_by(gid, buckets) for gid in chosen):
@@ -698,10 +700,10 @@ def _hosts_reading_unfiltered_rows(
698
700
  pool = [
699
701
  gid
700
702
  for gid in candidates
701
- if gid in below
702
- and gid in scope.main_lineage
703
+ if gid in scope.main_lineage
703
704
  and (
704
- buckets[gid].derivation in _EMITS_GROUP_BY
705
+ gid in below
706
+ and buckets[gid].derivation in _EMITS_GROUP_BY
705
707
  or windows
706
708
  and _window_over_rows(gid, scope)
707
709
  )
@@ -1091,6 +1091,7 @@ def plan_final_join(
1091
1091
  contracted: dict[str, frozenset[str]] | None = None,
1092
1092
  extras: Sequence[str] = (),
1093
1093
  built: Mapping[str, frozenset[str]] | None = None,
1094
+ columns: Mapping[str, frozenset[str]] | None = None,
1094
1095
  ) -> JoinPlan:
1095
1096
  """The plan for merging `cover` (contributor -> the outputs it supplies).
1096
1097
  A `split` contributor is joined as several projections of its own rows,
@@ -1101,7 +1102,10 @@ def plan_final_join(
1101
1102
  join beside the cover supplying nothing (bridges, filter-argument
1102
1103
  producers): they pair, but fix no grain and ask no ROOT to carry a key.
1103
1104
  `built` are the columns of the filters already built: a filter claims
1104
- the select's grain, and holds only what its node's columns determine."""
1105
+ the select's grain, and holds only what its node's columns determine.
1106
+ `columns` are those columns of a merge's filter sides, read to key their
1107
+ pairings only: a side's carries stay what it can be widened to
1108
+ (`_keyed_on_held`)."""
1105
1109
  built = built or {}
1106
1110
 
1107
1111
  def held_by(gid: str, *args: frozenset[str]) -> frozenset[str]:
@@ -1286,6 +1290,8 @@ def plan_final_join(
1286
1290
  or pairing.implied
1287
1291
  or pairing.kind == PairingKind.SCALAR
1288
1292
  )
1293
+ if columns:
1294
+ pairings = tuple(_keyed_on_held(p, columns, carries) for p in pairings)
1289
1295
  return JoinPlan(
1290
1296
  contributors,
1291
1297
  pins,
@@ -1303,6 +1309,32 @@ def plan_final_join(
1303
1309
  ).with_split(split)
1304
1310
 
1305
1311
 
1312
+ def _keyed_on_held(
1313
+ pairing: Pairing,
1314
+ columns: Mapping[str, frozenset[str]],
1315
+ carries: dict[str, frozenset[str]],
1316
+ ) -> Pairing:
1317
+ """A filter claims the select's grain but holds its groups' keys: where
1318
+ its node lacks a key of the pairing, the columns the keys determine and
1319
+ it holds key it in that key's place, for resolve drops a key a side lacks
1320
+ (`Filters.built_filter_keys_its_groups`)."""
1321
+ promoted = frozenset().union(
1322
+ *(
1323
+ pairing.implied & held & carries[other]
1324
+ for side, other in (
1325
+ (pairing.left, pairing.right),
1326
+ (pairing.right, pairing.left),
1327
+ )
1328
+ if (held := columns.get(side)) is not None and pairing.keys - held
1329
+ )
1330
+ )
1331
+ if not promoted:
1332
+ return pairing
1333
+ return replace(
1334
+ pairing, keys=pairing.keys | promoted, implied=pairing.implied - promoted
1335
+ )
1336
+
1337
+
1306
1338
  def subset_sides(
1307
1339
  carries: dict[str, frozenset[str]], environment: BuildEnvironment
1308
1340
  ) -> frozenset[str]:
@@ -4347,6 +4347,12 @@ def _merge_plan(
4347
4347
  split=frozenset(gid for gid in sides if sides.count(gid) > 1),
4348
4348
  contracted={gid: carry_demands.get(gid, frozenset()) for gid in sides},
4349
4349
  extras=bridges if len(sides) == len(parents) else (),
4350
+ columns={
4351
+ gid: _filter_built_columns(environment, parent, attrs[gid].grain_components)
4352
+ for parent in parents
4353
+ if (gid := _origin_group(parent, origin)) is not None
4354
+ and attrs[gid].derivation == Derivation.FILTER
4355
+ },
4350
4356
  )
4351
4357
 
4352
4358
 
@@ -432,9 +432,14 @@ def vgi_python_requirement() -> str:
432
432
  return "vgi-python"
433
433
 
434
434
 
435
- def resident_command(location: str, version: str | None = None) -> list[str]:
435
+ def resident_command(
436
+ location: str, version: str | None = None, static_args: tuple[str, ...] = ()
437
+ ) -> list[str]:
436
438
  """How to start a source as its own VGI worker (``--vgi``).
437
439
 
440
+ ``static_args`` come first, as in a one-shot run: the program reads them
441
+ once, at startup.
442
+
438
443
  vgi pools worker processes by their command line, so ``version`` goes on it
439
444
  (after ``--vgi``, which is all a served source reads): otherwise a worker for
440
445
  an edited source is drawn from the pool still running the old code.
@@ -442,7 +447,8 @@ def resident_command(location: str, version: str | None = None) -> list[str]:
442
447
  from trilogy.dialect.python_source import UV_RUN_PREFIX
443
448
  from trilogy.io.errors import VGI_FLAG
444
449
 
445
- tail = [VGI_FLAG, "--vgi-version", version] if version else [VGI_FLAG]
450
+ flags = [VGI_FLAG, "--vgi-version", version] if version else [VGI_FLAG]
451
+ tail = [*static_args, *flags]
446
452
  if Path(location).suffix == ".py":
447
453
  # The script's own dependencies need not include vgi.
448
454
  return [*UV_RUN_PREFIX, "--with", vgi_python_requirement(), location, *tail]
@@ -466,11 +472,12 @@ def source_version(location: str) -> str:
466
472
  return "|".join(stamps)
467
473
 
468
474
 
469
- def resident_alias(location: str) -> str:
470
- """A catalog alias per source *version*: an edited or rebuilt source gets a
471
- fresh worker rather than the pooled one still running the old code."""
472
- version = source_version(location)
473
- digest = hashlib.md5(f"{location}|{version}".encode()).hexdigest()[:12]
475
+ def resident_alias(location: str, static_args: tuple[str, ...] = ()) -> str:
476
+ """A catalog alias per source *version* and static arguments: an edited or
477
+ rebuilt source gets a fresh worker rather than the pooled one still running
478
+ the old code, and each set of arguments is a worker of its own."""
479
+ identity = "|".join([location, source_version(location), *static_args])
480
+ digest = hashlib.md5(identity.encode()).hexdigest()[:12]
474
481
  return f"{RESIDENT_ALIAS_PREFIX}{digest}"
475
482
 
476
483
 
@@ -493,7 +500,9 @@ def detach_resident(connection: Any, alias: str) -> None:
493
500
  RESIDENT_IDLE_SECONDS = 3600
494
501
 
495
502
 
496
- def attach_resident(connection: Any, location: str) -> str | None:
503
+ def attach_resident(
504
+ connection: Any, location: str, static_args: tuple[str, ...] = ()
505
+ ) -> str | None:
497
506
  """Attach ``location`` as a pooled worker; its alias, or None if it cannot serve.
498
507
 
499
508
  Runs on its own side cursor: an attach is database-wide, a failed one must
@@ -503,9 +512,11 @@ def attach_resident(connection: Any, location: str) -> str | None:
503
512
  side = duckdb_side_cursor(connection)
504
513
  if side is None:
505
514
  return None
506
- alias = resident_alias(location)
515
+ alias = resident_alias(location, static_args)
507
516
  version = alias.removeprefix(RESIDENT_ALIAS_PREFIX)
508
- command = vgi_location(resident_command(location, version), sys.platform == "win32")
517
+ command = vgi_location(
518
+ resident_command(location, version, static_args), sys.platform == "win32"
519
+ )
509
520
  escaped = command.replace("'", "''")
510
521
  try:
511
522
  side.execute(
@@ -812,10 +823,11 @@ class DuckDBDialect(BaseDialect):
812
823
  and config.python_datasource_transport == PythonDatasourceTransport.VGI
813
824
  )
814
825
  # Sources prepare_sources started as their own pooled worker, by
815
- # location -> attached alias. Anything absent renders via the bridge.
816
- self._residents: dict[str, str] = {}
817
- # location -> the version alias that failed to attach; an edit retries.
818
- self._not_resident: dict[str, str] = {}
826
+ # (location, static args) -> attached alias. Anything absent renders via
827
+ # the bridge.
828
+ self._residents: dict[tuple[str, tuple[str, ...]], str] = {}
829
+ # same key -> the version alias that failed to attach; an edit retries.
830
+ self._not_resident: dict[tuple[str, tuple[str, ...]], str] = {}
819
831
  self._bridge_attached = False
820
832
  # Resident workers have to be attached before a query references them.
821
833
  self.REQUIRES_SOURCE_PREPARATION = self._vgi
@@ -842,11 +854,13 @@ class DuckDBDialect(BaseDialect):
842
854
  which is itself attached only once a query needs it.
843
855
  """
844
856
  programs = list(
845
- dict.fromkeys(a.location for a in addresses if a.type.is_program)
857
+ dict.fromkeys(
858
+ (a.location, a.static_args) for a in addresses if a.type.is_program
859
+ )
846
860
  )
847
861
  # Re-checked per query, so a source edited under a running server is
848
862
  # served by a fresh worker (or retried, if it failed) from the next query on.
849
- versions = {p: resident_alias(p) for p in programs}
863
+ versions = {p: resident_alias(*p) for p in programs}
850
864
  pending = [
851
865
  p
852
866
  for p in programs
@@ -854,16 +868,15 @@ class DuckDBDialect(BaseDialect):
854
868
  ]
855
869
  if pending:
856
870
  with ThreadPoolExecutor(max_workers=min(len(pending), 8)) as pool:
857
- aliases = list(
858
- pool.map(partial(attach_resident, executor.connection), pending)
859
- )
860
- for location, alias in zip(pending, aliases):
861
- superseded = self._residents.pop(location, None)
862
- self._not_resident.pop(location, None)
871
+ attach = partial(attach_resident, executor.connection)
872
+ aliases = list(pool.map(attach, *zip(*pending)))
873
+ for program, alias in zip(pending, aliases):
874
+ superseded = self._residents.pop(program, None)
875
+ self._not_resident.pop(program, None)
863
876
  if alias is None:
864
- self._not_resident[location] = versions[location]
877
+ self._not_resident[program] = versions[program]
865
878
  else:
866
- self._residents[location] = alias
879
+ self._residents[program] = alias
867
880
  if superseded is not None and superseded != alias:
868
881
  detach_resident(executor.connection, superseded)
869
882
  if not self._bridge_attached and any(p in self._not_resident for p in programs):
@@ -951,19 +964,23 @@ class DuckDBDialect(BaseDialect):
951
964
  self.staging.prepare_executor_subdir(self.instance_id)
952
965
  from trilogy.dialect.source_pushdown import render_args
953
966
 
954
- args = " ".join(filter(None, [address.source_args, render_args(request)]))
967
+ pushdown = render_args(request)
968
+ args = " ".join(filter(None, [address.source_args, pushdown]))
955
969
  if self._vgi:
956
- escaped = args.replace("'", "''")
957
- alias = self._residents.get(address.location)
970
+ alias = self._residents.get((address.location, address.static_args))
958
971
  if alias is not None:
972
+ # A resident got its static args when it was launched.
973
+ call = " ".join(filter(None, [address.source_selector, pushdown]))
974
+ escaped = call.replace("'", "''")
959
975
  return f"{alias}.main.source('{escaped}')"
976
+ escaped = args.replace("'", "''")
960
977
  return f"{VGI_CATALOG}.main.script('{address.location}', '{escaped}')"
961
978
  if not args:
962
979
  return f"uv_run('{address.location}')"
963
980
  # Filter tokens are single-quoted for the shell (see
964
981
  # source_pushdown.render_args), so the SQL literal doubles them.
965
982
  # Everything else render_args emits is already SQL-safe; see
966
- # source_pushdown._is_transport_safe.
983
+ # source_pushdown.is_transport_safe.
967
984
  escaped = args.replace("'", "''")
968
985
  return f"uv_run('{address.location}', args := '{escaped}')"
969
986
  if address.type == AddressType.SQL:
@@ -71,7 +71,7 @@ def _operator_spelling(operator: ComparisonOperator | str) -> str | None:
71
71
  return spelling if spelling in PUSHABLE_OPERATORS else None
72
72
 
73
73
 
74
- def _is_transport_safe(rendered: str) -> bool:
74
+ def is_transport_safe(rendered: str) -> bool:
75
75
  """Whether a rendered filter survives SQL-literal + shell + shlex intact.
76
76
 
77
77
  ``args`` is embedded in a SQL string literal, concatenated into a shell
@@ -136,10 +136,10 @@ def _filter_from(
136
136
  if not isinstance(left, BuildConcept) or isinstance(right, BuildConcept):
137
137
  return None
138
138
  column = _column_for(datasource, left)
139
- if column is None or not _is_transport_safe(column):
139
+ if column is None or not is_transport_safe(column):
140
140
  return None
141
141
  rendered = _literal(right)
142
- if rendered is None or not _is_transport_safe(rendered):
142
+ if rendered is None or not is_transport_safe(rendered):
143
143
  return None
144
144
  return Filter(column, operator, right)
145
145
 
@@ -184,7 +184,7 @@ def serialize_order_by(
184
184
  if not isinstance(item.expr, BuildConcept):
185
185
  return (), False
186
186
  column = _column_for(datasource, item.expr)
187
- if column is None or not _is_transport_safe(column):
187
+ if column is None or not is_transport_safe(column):
188
188
  return (), False
189
189
  descending = item.order in DESCENDING_ORDERS
190
190
  if not descending and item.order not in ASCENDING_ORDERS:
@@ -114,6 +114,7 @@ from pydantic import BaseModel, Field
114
114
  from trilogy.core.enums import AddressType
115
115
  from trilogy.core.models.core import DataType
116
116
  from trilogy.core.models.datasource import (
117
+ SCRIPT_ARGS_SEPARATOR,
117
118
  Address,
118
119
  Datasource,
119
120
  UpdateKey,
@@ -422,9 +423,12 @@ def stable_asset_key(
422
423
  """
423
424
  if address_type == AddressType.QUERY:
424
425
  return f"{QUERY_KEY_SCHEME}{KEY_SCHEME_SEPARATOR}{query_digest(address)}"
425
- if address_type not in FILE_ADDRESS_TYPES or is_remote_address(address):
426
+ # A program's static args are not part of its path: neither an argument that
427
+ # is a URL nor one with a slash may change how the path is keyed.
428
+ path, separator, args = address.partition(SCRIPT_ARGS_SEPARATOR)
429
+ if address_type not in FILE_ADDRESS_TYPES or is_remote_address(path):
426
430
  return address
427
- relative = project_relative_path(address, project_root)
431
+ relative = f"{project_relative_path(path, project_root)}{separator}{args}"
428
432
  if address_type.is_program:
429
433
  return f"{SCRIPT_KEY_SCHEME}{KEY_SCHEME_SEPARATOR}{relative}"
430
434
  return relative
@@ -962,10 +962,14 @@ class Renderer:
962
962
  )
963
963
  return f"file [{paths}]"
964
964
  if arg.write_location:
965
- return f"file `{arg.location}`:`{arg.write_location}`"
966
- if arg.source_name:
967
- return f"file `{arg.location}#{arg.source_name}`"
968
- return f"file `{arg.location}`"
965
+ clause = f"file `{arg.location}`:`{arg.write_location}`"
966
+ else:
967
+ fragment = f"#{arg.source_name}" if arg.source_name else ""
968
+ clause = f"file `{arg.location}{fragment}`"
969
+ if arg.script_args:
970
+ values = ", ".join(self.to_string(a) for a in arg.script_args)
971
+ clause = f"{clause} args ({values})"
972
+ return clause
969
973
  # Anything not a bare IDENTIFIER (hyphens, ``-``/``*``/``:``, spaces)
970
974
  # only parses back as a backtick-quoted QUOTED_ADDRESS.
971
975
  if arg.quoted or not _BARE_IDENTIFIER.fullmatch(arg.location):
@@ -133,7 +133,9 @@
133
133
 
134
134
  file_path_list: "[" (F_FILE_PATH | FILE_PATH) ("," (F_FILE_PATH | FILE_PATH))* ","? "]"
135
135
  file_const_ref: IDENTIFIER
136
- file: "file" ((F_FILE_PATH ":" F_FILE_PATH) | (FILE_PATH ":" FILE_PATH) | F_FILE_PATH | FILE_PATH | EXEC_PATH | file_path_list | file_const_ref)
136
+ file: "file" ((F_FILE_PATH ":" F_FILE_PATH) | (FILE_PATH ":" FILE_PATH) | F_FILE_PATH | FILE_PATH | EXEC_PATH | file_path_list | file_const_ref) file_args?
137
+ file_args: "args"i "(" _file_arg ("," _file_arg)* ","? ")"
138
+ _file_arg: string_lit | float_lit | int_lit
137
139
 
138
140
  concept_assignment: SHORTHAND_MODIFIER* IDENTIFIER
139
141