pytrilogy 0.0.3.103__tar.gz → 0.0.3.105__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.

Potentially problematic release.


This version of pytrilogy might be problematic. Click here for more details.

Files changed (161) hide show
  1. {pytrilogy-0.0.3.103/pytrilogy.egg-info → pytrilogy-0.0.3.105}/PKG-INFO +1 -1
  2. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105/pytrilogy.egg-info}/PKG-INFO +1 -1
  3. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pytrilogy.egg-info/SOURCES.txt +1 -0
  4. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_partial_handling.py +2 -2
  5. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/__init__.py +1 -1
  6. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/constants.py +1 -1
  7. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/execute.py +1 -6
  8. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimizations/predicate_pushdown.py +9 -1
  9. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/concept_strategies_v3.py +35 -14
  10. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/discovery_node_factory.py +6 -1
  11. pytrilogy-0.0.3.105/trilogy/core/processing/discovery_utility.py +316 -0
  12. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/basic_node.py +1 -0
  13. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/common.py +1 -0
  14. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/filter_node.py +4 -15
  15. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/group_node.py +36 -0
  16. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/multiselect_node.py +1 -1
  17. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/node_merge_node.py +2 -6
  18. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/rowset_node.py +1 -1
  19. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/unnest_node.py +0 -5
  20. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/base_node.py +13 -2
  21. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/group_node.py +9 -91
  22. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/merge_node.py +9 -0
  23. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/utility.py +8 -0
  24. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/base.py +3 -0
  25. pytrilogy-0.0.3.105/trilogy/std/color.preql +3 -0
  26. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/display.preql +3 -3
  27. pytrilogy-0.0.3.103/trilogy/core/processing/discovery_utility.py +0 -145
  28. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/LICENSE.md +0 -0
  29. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/README.md +0 -0
  30. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pyproject.toml +0 -0
  31. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pytrilogy.egg-info/dependency_links.txt +0 -0
  32. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pytrilogy.egg-info/entry_points.txt +0 -0
  33. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pytrilogy.egg-info/requires.txt +0 -0
  34. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/pytrilogy.egg-info/top_level.txt +0 -0
  35. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/setup.cfg +0 -0
  36. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/setup.py +0 -0
  37. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_datatypes.py +0 -0
  38. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_declarations.py +0 -0
  39. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_derived_concepts.py +0 -0
  40. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_discovery_nodes.py +0 -0
  41. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_enums.py +0 -0
  42. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_environment.py +0 -0
  43. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_execute_models.py +0 -0
  44. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_executor.py +0 -0
  45. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_failure.py +0 -0
  46. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_functions.py +0 -0
  47. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_imports.py +0 -0
  48. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_metadata.py +0 -0
  49. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_models.py +0 -0
  50. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_multi_join_assignments.py +0 -0
  51. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_parse_engine.py +0 -0
  52. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_parsing.py +0 -0
  53. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_parsing_failures.py +0 -0
  54. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_query_processing.py +0 -0
  55. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_query_render.py +0 -0
  56. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_select.py +0 -0
  57. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_show.py +0 -0
  58. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_statements.py +0 -0
  59. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_typing.py +0 -0
  60. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_undefined_concept.py +0 -0
  61. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_user_functions.py +0 -0
  62. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_validators.py +0 -0
  63. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/tests/test_where_clause.py +0 -0
  64. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/authoring/__init__.py +0 -0
  65. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/__init__.py +0 -0
  66. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/constants.py +0 -0
  67. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/enums.py +0 -0
  68. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/env_processor.py +0 -0
  69. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/environment_helpers.py +0 -0
  70. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/ergonomics.py +0 -0
  71. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/exceptions.py +0 -0
  72. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/functions.py +0 -0
  73. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/graph_models.py +0 -0
  74. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/internal.py +0 -0
  75. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/__init__.py +0 -0
  76. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/author.py +0 -0
  77. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/build.py +0 -0
  78. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/build_environment.py +0 -0
  79. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/core.py +0 -0
  80. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/datasource.py +0 -0
  81. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/models/environment.py +0 -0
  82. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimization.py +0 -0
  83. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimizations/__init__.py +0 -0
  84. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimizations/base_optimization.py +0 -0
  85. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimizations/hide_unused_concept.py +0 -0
  86. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/optimizations/inline_datasource.py +0 -0
  87. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/__init__.py +0 -0
  88. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/discovery_validation.py +0 -0
  89. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/graph_utils.py +0 -0
  90. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/__init__.py +0 -0
  91. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/constant_node.py +0 -0
  92. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/group_to_node.py +0 -0
  93. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/recursive_node.py +0 -0
  94. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/select_helpers/__init__.py +0 -0
  95. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/select_helpers/datasource_injection.py +0 -0
  96. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/select_merge_node.py +0 -0
  97. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/select_node.py +0 -0
  98. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/synonym_node.py +0 -0
  99. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/union_node.py +0 -0
  100. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/node_generators/window_node.py +0 -0
  101. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/__init__.py +0 -0
  102. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/filter_node.py +0 -0
  103. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/recursive_node.py +0 -0
  104. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/select_node_v2.py +0 -0
  105. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/union_node.py +0 -0
  106. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/unnest_node.py +0 -0
  107. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/processing/nodes/window_node.py +0 -0
  108. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/query_processor.py +0 -0
  109. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/statements/__init__.py +0 -0
  110. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/statements/author.py +0 -0
  111. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/statements/build.py +0 -0
  112. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/statements/common.py +0 -0
  113. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/statements/execute.py +0 -0
  114. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/utility.py +0 -0
  115. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/__init__.py +0 -0
  116. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/common.py +0 -0
  117. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/concept.py +0 -0
  118. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/datasource.py +0 -0
  119. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/environment.py +0 -0
  120. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/core/validation/fix.py +0 -0
  121. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/__init__.py +0 -0
  122. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/bigquery.py +0 -0
  123. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/common.py +0 -0
  124. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/config.py +0 -0
  125. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/dataframe.py +0 -0
  126. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/duckdb.py +0 -0
  127. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/enums.py +0 -0
  128. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/metadata.py +0 -0
  129. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/postgres.py +0 -0
  130. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/presto.py +0 -0
  131. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/snowflake.py +0 -0
  132. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/dialect/sql_server.py +0 -0
  133. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/engine.py +0 -0
  134. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/executor.py +0 -0
  135. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/hooks/__init__.py +0 -0
  136. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/hooks/base_hook.py +0 -0
  137. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/hooks/graph_hook.py +0 -0
  138. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/hooks/query_debugger.py +0 -0
  139. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/metadata/__init__.py +0 -0
  140. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parser.py +0 -0
  141. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/__init__.py +0 -0
  142. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/common.py +0 -0
  143. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/config.py +0 -0
  144. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/exceptions.py +0 -0
  145. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/helpers.py +0 -0
  146. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/parse_engine.py +0 -0
  147. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/render.py +0 -0
  148. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/parsing/trilogy.lark +0 -0
  149. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/py.typed +0 -0
  150. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/render.py +0 -0
  151. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/scripts/__init__.py +0 -0
  152. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/scripts/trilogy.py +0 -0
  153. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/__init__.py +0 -0
  154. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/date.preql +0 -0
  155. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/geography.preql +0 -0
  156. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/metric.preql +0 -0
  157. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/money.preql +0 -0
  158. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/net.preql +0 -0
  159. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/ranking.preql +0 -0
  160. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/std/report.preql +0 -0
  161. {pytrilogy-0.0.3.103 → pytrilogy-0.0.3.105}/trilogy/utility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytrilogy
3
- Version: 0.0.3.103
3
+ Version: 0.0.3.105
4
4
  Summary: Declarative, typed query language that compiles to SQL.
5
5
  Home-page:
6
6
  Author:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytrilogy
3
- Version: 0.0.3.103
3
+ Version: 0.0.3.105
4
4
  Summary: Declarative, typed query language that compiles to SQL.
5
5
  Home-page:
6
6
  Author:
@@ -147,6 +147,7 @@ trilogy/parsing/trilogy.lark
147
147
  trilogy/scripts/__init__.py
148
148
  trilogy/scripts/trilogy.py
149
149
  trilogy/std/__init__.py
150
+ trilogy/std/color.preql
150
151
  trilogy/std/date.preql
151
152
  trilogy/std/display.preql
152
153
  trilogy/std/geography.preql
@@ -2,7 +2,7 @@ from sqlalchemy import create_engine
2
2
 
3
3
  from trilogy import Dialects, Executor
4
4
  from trilogy.core.enums import Purpose
5
- from trilogy.core.models.author import Concept
5
+ from trilogy.core.models.author import Concept, Grain
6
6
  from trilogy.core.models.core import (
7
7
  DataType,
8
8
  )
@@ -90,6 +90,7 @@ def setup_titanic(env: Environment):
90
90
  ColumnAssignment(alias="name", concept=name),
91
91
  ColumnAssignment(alias="fare", concept=fare),
92
92
  ],
93
+ grain=Grain(components=[id.address]),
93
94
  ),
94
95
  )
95
96
  return env
@@ -140,7 +141,6 @@ def test_partial_assignment():
140
141
  depth=0,
141
142
  )
142
143
  assert isinstance(sourced, FilterNode)
143
- assert len(sourced.parents) == 1
144
144
 
145
145
 
146
146
  def test_filter_query():
@@ -4,6 +4,6 @@ from trilogy.dialect.enums import Dialects
4
4
  from trilogy.executor import Executor
5
5
  from trilogy.parser import parse
6
6
 
7
- __version__ = "0.0.3.103"
7
+ __version__ = "0.0.3.105"
8
8
 
9
9
  __all__ = ["parse", "Executor", "Dialects", "Environment", "CONFIG"]
@@ -37,7 +37,7 @@ class Comments:
37
37
 
38
38
  show: bool = False
39
39
  basic: bool = True
40
- joins: bool = True
40
+ joins: bool = False
41
41
  nullable: bool = True
42
42
  partial: bool = True
43
43
  source_map: bool = False
@@ -711,8 +711,6 @@ class QueryDatasource(BaseModel):
711
711
  f" {[c.address for c in self.output_concepts]} concepts and"
712
712
  f" {other.name} with {[c.address for c in other.output_concepts]} concepts"
713
713
  )
714
- logger.info(self.source_map)
715
- logger.info(other.source_map)
716
714
 
717
715
  merged_datasources: dict[str, Union[BuildDatasource, "QueryDatasource"]] = {}
718
716
 
@@ -816,10 +814,7 @@ class QueryDatasource(BaseModel):
816
814
  use_raw_name,
817
815
  force_alias=force_alias,
818
816
  )
819
- except ValueError as e:
820
- from trilogy.constants import logger
821
-
822
- logger.debug(e)
817
+ except ValueError:
823
818
  continue
824
819
  existing = [c.with_grain(self.grain) for c in self.output_concepts]
825
820
  if concept in existing:
@@ -1,5 +1,6 @@
1
1
  from trilogy.core.enums import (
2
2
  BooleanOperator,
3
+ SourceType,
3
4
  )
4
5
  from trilogy.core.models.build import (
5
6
  BuildComparison,
@@ -59,12 +60,19 @@ class PredicatePushdown(OptimizationRule):
59
60
  )
60
61
  return False
61
62
  materialized = {k for k, v in parent_cte.source_map.items() if v != []}
63
+
62
64
  if not row_conditions or not materialized:
63
65
  return False
64
66
  output_addresses = {x.address for x in parent_cte.output_columns}
65
67
  # if any of the existence conditions are created on the asset, we can't push up to it
66
68
  if existence_conditions and existence_conditions.intersection(output_addresses):
67
69
  return False
70
+ if existence_conditions:
71
+ self.log(
72
+ f"Not pushing up existence {candidate} to {parent_cte.name} as it is a filter node"
73
+ )
74
+ if parent_cte.source.source_type == SourceType.FILTER:
75
+ return False
68
76
  # if it's a root datasource, we can filter on _any_ of the output concepts
69
77
  if parent_cte.is_root_datasource:
70
78
  extra_check = {
@@ -81,7 +89,7 @@ class PredicatePushdown(OptimizationRule):
81
89
  children = inverse_map.get(parent_cte.name, [])
82
90
  if all([is_child_of(candidate, child.condition) for child in children]):
83
91
  self.log(
84
- f"All concepts are found on {parent_cte.name} with existing {parent_cte.condition} and all it's {len(children)} children include same filter; pushing up {candidate}"
92
+ f"All concepts [{row_conditions}] and existence conditions [{existence_conditions}] not block pushup of [{output_addresses}]found on {parent_cte.name} with existing {parent_cte.condition} and all it's {len(children)} children include same filter; pushing up {candidate}"
85
93
  )
86
94
  if parent_cte.condition and not is_scalar_condition(
87
95
  parent_cte.condition
@@ -19,7 +19,7 @@ from trilogy.core.processing.discovery_utility import (
19
19
  LOGGER_PREFIX,
20
20
  depth_to_prefix,
21
21
  get_priority_concept,
22
- group_if_required,
22
+ group_if_required_v2,
23
23
  )
24
24
  from trilogy.core.processing.discovery_validation import (
25
25
  ValidationResult,
@@ -66,7 +66,19 @@ def generate_candidates_restrictive(
66
66
 
67
67
  # if it's single row, joins are irrelevant. Fetch without keys.
68
68
  if priority_concept.granularity == Granularity.SINGLE_ROW:
69
- return [], conditions
69
+ logger.info("Have single row concept, including only other single row optional")
70
+ optional = (
71
+ [
72
+ x
73
+ for x in candidates
74
+ if x.granularity == Granularity.SINGLE_ROW
75
+ and x.address not in priority_concept.pseudonyms
76
+ and priority_concept.address not in x.pseudonyms
77
+ ]
78
+ if priority_concept.derivation == Derivation.AGGREGATE
79
+ else []
80
+ )
81
+ return optional, conditions
70
82
 
71
83
  if conditions and priority_concept.derivation in ROOT_DERIVATIONS:
72
84
  logger.info(
@@ -374,15 +386,21 @@ def generate_loop_completion(context: LoopContext, virtual: set[str]) -> Strateg
374
386
  logger.info(
375
387
  f"{depth_to_prefix(context.depth)}{LOGGER_PREFIX} Found different non-virtual output concepts ({non_virtual_difference_values}), removing condition injected values by setting outputs to {[x.address for x in output.output_concepts if x.address in non_virtual_output]}"
376
388
  )
377
- output.set_output_concepts(
378
- [
379
- x
380
- for x in output.output_concepts
381
- if x.address in non_virtual_output
382
- or any(c in non_virtual_output for c in x.pseudonyms)
383
- ],
384
- rebuild=False,
385
- )
389
+ # output.set_output_concepts(
390
+ # [
391
+ # x
392
+ # for x in output.output_concepts
393
+ # if x.address not in non_virtual_difference_values
394
+ # or any(c in non_virtual_output for c in x.pseudonyms)
395
+ # ],
396
+ # rebuild=True,
397
+ # change_visibility=False
398
+ # )
399
+ # output.set_output_concepts(context.original_mandatory)
400
+
401
+ # if isinstance(output, MergeNode):
402
+ # output.force_group = True
403
+ # output.rebuild_cache()
386
404
 
387
405
  logger.info(
388
406
  f"{depth_to_prefix(context.depth)}{LOGGER_PREFIX} Source stack has single node, returning that {type(output)}"
@@ -416,14 +434,17 @@ def generate_loop_completion(context: LoopContext, virtual: set[str]) -> Strateg
416
434
  logger.info(
417
435
  f"{depth_to_prefix(context.depth)}{LOGGER_PREFIX} Graph is connected, returning {type(output)} node output {[x.address for x in output.usable_outputs]} partial {[c.address for c in output.partial_concepts or []]} with {context.conditions}"
418
436
  )
437
+ from trilogy.core.processing.discovery_utility import group_if_required_v2
438
+
419
439
  if condition_required and context.conditions and non_virtual_different:
420
440
  logger.info(
421
441
  f"{depth_to_prefix(context.depth)}{LOGGER_PREFIX} Conditions {context.conditions} were injected, checking if we need a group to restore grain"
422
442
  )
423
- return group_if_required(
443
+ return group_if_required_v2(
424
444
  output, context.original_mandatory, context.environment
425
445
  )
426
- return output
446
+
447
+ return group_if_required_v2(output, context.original_mandatory, context.environment)
427
448
 
428
449
 
429
450
  def _search_concepts(
@@ -588,4 +609,4 @@ def source_query_concepts(
588
609
  logger.info(
589
610
  f"{depth_to_prefix(0)}{LOGGER_PREFIX} final concepts are {[x.address for x in final]}"
590
611
  )
591
- return group_if_required(root, output_concepts, environment)
612
+ return group_if_required_v2(root, output_concepts, environment)
@@ -177,7 +177,12 @@ def _generate_union_node(ctx: NodeGenerationContext) -> StrategyNode | None:
177
177
  def _generate_aggregate_node(ctx: NodeGenerationContext) -> StrategyNode | None:
178
178
  # Filter out constants to avoid multiplication issues
179
179
  agg_optional = [
180
- x for x in ctx.local_optional if x.granularity != Granularity.SINGLE_ROW
180
+ x
181
+ for x in ctx.local_optional
182
+ if not (
183
+ x.granularity == Granularity.SINGLE_ROW
184
+ and x.derivation != Derivation.AGGREGATE
185
+ )
181
186
  ]
182
187
 
183
188
  logger.info(
@@ -0,0 +1,316 @@
1
+ from typing import List
2
+
3
+ from trilogy.constants import logger
4
+ from trilogy.core.enums import Derivation, Purpose
5
+ from trilogy.core.models.build import (
6
+ BuildConcept,
7
+ BuildDatasource,
8
+ BuildFilterItem,
9
+ BuildGrain,
10
+ BuildRowsetItem,
11
+ )
12
+ from trilogy.core.models.build_environment import BuildEnvironment
13
+ from trilogy.core.models.execute import QueryDatasource, UnnestJoin
14
+ from trilogy.core.processing.nodes import GroupNode, MergeNode, StrategyNode
15
+ from trilogy.core.processing.utility import GroupRequiredResponse
16
+
17
+
18
+ def depth_to_prefix(depth: int) -> str:
19
+ return "\t" * depth
20
+
21
+
22
+ LOGGER_PREFIX = "[DISCOVERY LOOP]"
23
+
24
+
25
+ def calculate_effective_parent_grain(
26
+ node: QueryDatasource | BuildDatasource,
27
+ ) -> BuildGrain:
28
+ # calculate the effective grain of the parent node
29
+ # this is the union of all parent grains
30
+ if isinstance(node, QueryDatasource):
31
+ grain = BuildGrain()
32
+ qds = node
33
+ if not qds.joins:
34
+ return qds.datasources[0].grain
35
+ seen = set()
36
+ for join in qds.joins:
37
+ if isinstance(join, UnnestJoin):
38
+ grain += BuildGrain(components=set([x.address for x in join.concepts]))
39
+ continue
40
+ pairs = join.concept_pairs or []
41
+ for key in pairs:
42
+ left = key.existing_datasource
43
+ logger.info(f"adding left grain {left.grain} for join key {key.left}")
44
+ grain += left.grain
45
+ seen.add(left.name)
46
+ keys = [key.right for key in pairs]
47
+ join_grain = BuildGrain.from_concepts(keys)
48
+ if join_grain == join.right_datasource.grain:
49
+ logger.info(f"irrelevant right join {join}, does not change grain")
50
+ else:
51
+ logger.info(
52
+ f"join changes grain, adding {join.right_datasource.grain} to {grain}"
53
+ )
54
+ grain += join.right_datasource.grain
55
+ seen.add(join.right_datasource.name)
56
+ for x in qds.datasources:
57
+ # if we haven't seen it, it's still contributing to grain
58
+ # unless used ONLY in a subselect
59
+ # so the existence check is a [bad] proxy for that
60
+ if x.name not in seen and not (
61
+ qds.condition
62
+ and qds.condition.existence_arguments
63
+ and any(
64
+ [
65
+ c.address in block
66
+ for c in x.output_concepts
67
+ for block in qds.condition.existence_arguments
68
+ ]
69
+ )
70
+ ):
71
+ logger.info(f"adding unjoined grain {x.grain} for datasource {x.name}")
72
+ grain += x.grain
73
+ return grain
74
+ else:
75
+ return node.grain or BuildGrain()
76
+
77
+
78
+ def check_if_group_required(
79
+ downstream_concepts: List[BuildConcept],
80
+ parents: list[QueryDatasource | BuildDatasource],
81
+ environment: BuildEnvironment,
82
+ depth: int = 0,
83
+ ) -> GroupRequiredResponse:
84
+ padding = "\t" * depth
85
+ target_grain = BuildGrain.from_concepts(
86
+ downstream_concepts,
87
+ environment=environment,
88
+ )
89
+
90
+ comp_grain = BuildGrain()
91
+ for source in parents:
92
+ # comp_grain += source.grain
93
+ comp_grain += calculate_effective_parent_grain(source)
94
+
95
+ # dynamically select if we need to group
96
+ # we must avoid grouping if we are already at grain
97
+ if comp_grain.issubset(target_grain):
98
+
99
+ logger.info(
100
+ f"{padding}{LOGGER_PREFIX} Group requirement check: {comp_grain}, target: {target_grain}, grain is subset of target, no group node required"
101
+ )
102
+ return GroupRequiredResponse(target_grain, comp_grain, False)
103
+ # find out what extra is in the comp grain vs target grain
104
+ difference = [
105
+ environment.concepts[c] for c in (comp_grain - target_grain).components
106
+ ]
107
+ logger.info(
108
+ f"{padding}{LOGGER_PREFIX} Group requirement check: upstream grain: {comp_grain}, desired grain: {target_grain} from , difference {[x.address for x in difference]}"
109
+ )
110
+ for x in difference:
111
+ logger.info(
112
+ f"{padding}{LOGGER_PREFIX} Difference concept {x.address} purpose {x.purpose} keys {x.keys}"
113
+ )
114
+
115
+ # if the difference is all unique properties whose keys are in the source grain
116
+ # we can also suppress the group
117
+ if all(
118
+ [
119
+ x.keys
120
+ and all(
121
+ environment.concepts[z].address in comp_grain.components for z in x.keys
122
+ )
123
+ for x in difference
124
+ ]
125
+ ):
126
+ logger.info(
127
+ f"{padding}{LOGGER_PREFIX} Group requirement check: skipped due to unique property validation"
128
+ )
129
+ return GroupRequiredResponse(target_grain, comp_grain, False)
130
+ if all([x.purpose == Purpose.KEY for x in difference]):
131
+ logger.info(
132
+ f"{padding}{LOGGER_PREFIX} checking if downstream is unique properties of key"
133
+ )
134
+ replaced_grain_raw: list[set[str]] = [
135
+ (
136
+ x.keys or set()
137
+ if x.purpose == Purpose.UNIQUE_PROPERTY
138
+ else set([x.address])
139
+ )
140
+ for x in downstream_concepts
141
+ if x.address in target_grain.components
142
+ ]
143
+ # flatten the list of lists
144
+ replaced_grain = [item for sublist in replaced_grain_raw for item in sublist]
145
+ # if the replaced grain is a subset of the comp grain, we can skip the group
146
+ unique_grain_comp = BuildGrain.from_concepts(
147
+ replaced_grain, environment=environment
148
+ )
149
+ if comp_grain.issubset(unique_grain_comp):
150
+ logger.info(
151
+ f"{padding}{LOGGER_PREFIX} Group requirement check: skipped due to unique property validation"
152
+ )
153
+ return GroupRequiredResponse(target_grain, comp_grain, False)
154
+ logger.info(
155
+ f"{padding}{LOGGER_PREFIX} Checking for grain equivalence for filters and rowsets"
156
+ )
157
+ ngrain = []
158
+ for con in target_grain.components:
159
+ full = environment.concepts[con]
160
+ if full.derivation == Derivation.ROWSET:
161
+ ngrain.append(full.address.split(".", 1)[1])
162
+ elif full.derivation == Derivation.FILTER:
163
+ assert isinstance(full.lineage, BuildFilterItem)
164
+ if isinstance(full.lineage.content, BuildConcept):
165
+ ngrain.append(full.lineage.content.address)
166
+ else:
167
+ ngrain.append(full.address)
168
+ target_grain2 = BuildGrain.from_concepts(
169
+ ngrain,
170
+ environment=environment,
171
+ )
172
+ if comp_grain.issubset(target_grain2):
173
+ logger.info(
174
+ f"{padding}{LOGGER_PREFIX} Group requirement check: {comp_grain}, {target_grain2}, pre rowset grain is subset of target, no group node required"
175
+ )
176
+ return GroupRequiredResponse(target_grain2, comp_grain, False)
177
+
178
+ logger.info(f"{padding}{LOGGER_PREFIX} Group requirement check: group required")
179
+ return GroupRequiredResponse(target_grain, comp_grain, True)
180
+
181
+
182
+ def group_if_required_v2(
183
+ root: StrategyNode, final: List[BuildConcept], environment: BuildEnvironment
184
+ ):
185
+ required = check_if_group_required(
186
+ downstream_concepts=final, parents=[root.resolve()], environment=environment
187
+ )
188
+ targets = [
189
+ x
190
+ for x in root.output_concepts
191
+ if x.address in final or any(c in final for c in x.pseudonyms)
192
+ ]
193
+ if required.required:
194
+ if isinstance(root, MergeNode):
195
+ root.force_group = True
196
+ root.set_output_concepts(targets, rebuild=False, change_visibility=False)
197
+ root.rebuild_cache()
198
+ return root
199
+ elif isinstance(root, GroupNode):
200
+ # root.set_output_concepts(final, rebuild=False)
201
+ # root.rebuild_cache()
202
+ return root
203
+ return GroupNode(
204
+ output_concepts=targets,
205
+ input_concepts=targets,
206
+ environment=environment,
207
+ parents=[root],
208
+ partial_concepts=root.partial_concepts,
209
+ preexisting_conditions=root.preexisting_conditions,
210
+ )
211
+ elif isinstance(root, GroupNode):
212
+
213
+ return root
214
+ else:
215
+ root.set_output_concepts(targets, rebuild=False, change_visibility=False)
216
+ return root
217
+
218
+
219
+ def get_upstream_concepts(base: BuildConcept, nested: bool = False) -> set[str]:
220
+ upstream = set()
221
+ if nested:
222
+ upstream.add(base.address)
223
+ if not base.lineage:
224
+ return upstream
225
+ for x in base.lineage.concept_arguments:
226
+ # if it's derived from any value in a rowset, ALL rowset items are upstream
227
+ if x.derivation == Derivation.ROWSET:
228
+ assert isinstance(x.lineage, BuildRowsetItem), type(x.lineage)
229
+ for y in x.lineage.rowset.select.output_components:
230
+ upstream.add(f"{x.lineage.rowset.name}.{y.address}")
231
+ # upstream = upstream.union(get_upstream_concepts(y, nested=True))
232
+ upstream = upstream.union(get_upstream_concepts(x, nested=True))
233
+ return upstream
234
+
235
+
236
+ def get_priority_concept(
237
+ all_concepts: List[BuildConcept],
238
+ attempted_addresses: set[str],
239
+ found_concepts: set[str],
240
+ depth: int,
241
+ ) -> BuildConcept:
242
+ # optimized search for missing concepts
243
+ pass_one = sorted(
244
+ [
245
+ c
246
+ for c in all_concepts
247
+ if c.address not in attempted_addresses and c.address not in found_concepts
248
+ ],
249
+ key=lambda x: x.address,
250
+ )
251
+ # sometimes we need to scan intermediate concepts to get merge keys or filter keys,
252
+ # so do an exhaustive search
253
+ # pass_two = [c for c in all_concepts+filter_only if c.address not in attempted_addresses]
254
+ for remaining_concept in (pass_one,):
255
+ priority = (
256
+ # then multiselects to remove them from scope
257
+ [c for c in remaining_concept if c.derivation == Derivation.MULTISELECT]
258
+ +
259
+ # then rowsets to remove them from scope, as they cannot get partials
260
+ [c for c in remaining_concept if c.derivation == Derivation.ROWSET]
261
+ +
262
+ # then rowsets to remove them from scope, as they cannot get partials
263
+ [c for c in remaining_concept if c.derivation == Derivation.UNION]
264
+ # we should be home-free here
265
+ +
266
+ # then aggregates to remove them from scope, as they cannot get partials
267
+ [c for c in remaining_concept if c.derivation == Derivation.AGGREGATE]
268
+ # then windows to remove them from scope, as they cannot get partials
269
+ + [c for c in remaining_concept if c.derivation == Derivation.WINDOW]
270
+ # then filters to remove them from scope, also cannot get partials
271
+ + [c for c in remaining_concept if c.derivation == Derivation.FILTER]
272
+ # unnests are weird?
273
+ + [c for c in remaining_concept if c.derivation == Derivation.UNNEST]
274
+ + [c for c in remaining_concept if c.derivation == Derivation.RECURSIVE]
275
+ + [c for c in remaining_concept if c.derivation == Derivation.BASIC]
276
+ + [c for c in remaining_concept if c.derivation == Derivation.GROUP_TO]
277
+ + [c for c in remaining_concept if c.derivation == Derivation.CONSTANT]
278
+ # finally our plain selects
279
+ + [
280
+ c for c in remaining_concept if c.derivation == Derivation.ROOT
281
+ ] # and any non-single row constants
282
+ )
283
+
284
+ priority += [
285
+ c
286
+ for c in remaining_concept
287
+ if c.address not in [x.address for x in priority]
288
+ ]
289
+ final = []
290
+ # if any thing is derived from another concept
291
+ # get the derived copy first
292
+ # as this will usually resolve cleaner
293
+ for x in priority:
294
+ if any(
295
+ [
296
+ x.address
297
+ in get_upstream_concepts(
298
+ c,
299
+ )
300
+ for c in priority
301
+ ]
302
+ ):
303
+ logger.info(
304
+ f"{depth_to_prefix(depth)}{LOGGER_PREFIX} delaying fetch of {x.address} as parent of another concept"
305
+ )
306
+ continue
307
+ final.append(x)
308
+ # then append anything we didn't get
309
+ for x2 in priority:
310
+ if x2 not in final:
311
+ final.append(x2)
312
+ if final:
313
+ return final[0]
314
+ raise ValueError(
315
+ f"Cannot resolve query. No remaining priority concepts, have attempted {attempted_addresses}"
316
+ )
@@ -143,4 +143,5 @@ def gen_basic_node(
143
143
  logger.info(
144
144
  f"{depth_prefix}{LOGGER_PREFIX} Returning basic select for {concept}: input: {[x.address for x in parent_node.input_concepts]} output {[x.address for x in parent_node.output_concepts]} hidden {[x for x in parent_node.hidden_concepts]}"
145
145
  )
146
+
146
147
  return parent_node
@@ -222,6 +222,7 @@ def gen_enrichment_node(
222
222
  parents=[enrich_node, base_node],
223
223
  force_group=False,
224
224
  preexisting_conditions=conditions.conditional if conditions else None,
225
+ depth=depth,
225
226
  )
226
227
 
227
228
 
@@ -4,7 +4,6 @@ from trilogy.constants import logger
4
4
  from trilogy.core.models.build import (
5
5
  BuildConcept,
6
6
  BuildFilterItem,
7
- BuildGrain,
8
7
  BuildWhereClause,
9
8
  )
10
9
  from trilogy.core.models.build_environment import BuildEnvironment
@@ -238,21 +237,14 @@ def gen_filter_node(
238
237
  if not parent.preexisting_conditions == where.conditional:
239
238
  parent.add_condition(where.conditional)
240
239
  parent.add_existence_concepts(flattened_existence, False)
241
- parent.grain = BuildGrain.from_concepts(
242
- parent.output_concepts,
243
- environment=environment,
244
- )
240
+ # parent.grain = BuildGrain.from_concepts(
241
+ # parent.output_concepts,
242
+ # environment=environment,
243
+ # )
245
244
  parent.rebuild_cache()
246
245
  filter_node = parent
247
246
  else:
248
247
  core_parent_nodes.append(row_parent)
249
- filters = [concept] + same_filter_optional
250
- parents_for_grain = [
251
- x.lineage.content
252
- for x in filters
253
- if isinstance(x.lineage, BuildFilterItem)
254
- and isinstance(x.lineage.content, BuildConcept)
255
- ]
256
248
  filter_node = FilterNode(
257
249
  input_concepts=unique(
258
250
  parent_row_concepts + flattened_existence,
@@ -261,9 +253,6 @@ def gen_filter_node(
261
253
  output_concepts=[concept] + same_filter_optional + parent_row_concepts,
262
254
  environment=environment,
263
255
  parents=core_parent_nodes,
264
- grain=BuildGrain.from_concepts(
265
- parents_for_grain + parent_row_concepts, environment=environment
266
- ),
267
256
  preexisting_conditions=conditions.conditional if conditions else None,
268
257
  )
269
258
 
@@ -108,6 +108,42 @@ def gen_group_node(
108
108
  logger.info(
109
109
  f"{padding(depth)}{LOGGER_PREFIX} cannot include optional agg {possible_agg.address}; it has mismatched parent grain {comp_grain } vs local parent {build_grain_parents}"
110
110
  )
111
+ elif concept.grain.abstract:
112
+ for possible_agg in local_optional:
113
+ if not isinstance(
114
+ possible_agg.lineage,
115
+ (BuildAggregateWrapper, BuildFunction),
116
+ ):
117
+
118
+ continue
119
+ logger.info(
120
+ f"{padding(depth)}{LOGGER_PREFIX} considering optional agg {possible_agg.address} for {concept.address}"
121
+ )
122
+ agg_parents = resolve_function_parent_concepts(
123
+ possible_agg,
124
+ environment=environment,
125
+ )
126
+ comp_grain = get_aggregate_grain(possible_agg, environment)
127
+ if not possible_agg.grain.abstract:
128
+ continue
129
+ if set([x.address for x in agg_parents]).issubset(
130
+ set([x.address for x in parent_concepts])
131
+ ):
132
+ output_concepts.append(possible_agg)
133
+ logger.info(
134
+ f"{padding(depth)}{LOGGER_PREFIX} found equivalent group by optional concept {possible_agg.address} for {concept.address}"
135
+ )
136
+ elif comp_grain == get_aggregate_grain(concept, environment):
137
+ extra = [x for x in agg_parents if x.address not in parent_concepts]
138
+ parent_concepts += extra
139
+ output_concepts.append(possible_agg)
140
+ logger.info(
141
+ f"{padding(depth)}{LOGGER_PREFIX} found equivalent group by optional concept {possible_agg.address} for {concept.address}"
142
+ )
143
+ else:
144
+ logger.info(
145
+ f"{padding(depth)}{LOGGER_PREFIX} cannot include optional agg {possible_agg.address}; it has mismatched parent grain {comp_grain } vs local parent {get_aggregate_grain(concept, environment)}"
146
+ )
111
147
  if parent_concepts:
112
148
  target_grain = BuildGrain.from_concepts(parent_concepts)
113
149
  logger.info(
@@ -156,7 +156,7 @@ def gen_multiselect_node(
156
156
  possible_joins = concept_to_relevant_joins(additional_relevant)
157
157
  if not local_optional:
158
158
  logger.info(
159
- f"{padding(depth)}{LOGGER_PREFIX} no enriched required for rowset node; exiting early"
159
+ f"{padding(depth)}{LOGGER_PREFIX} no enrichment required for rowset node; exiting early"
160
160
  )
161
161
  return node
162
162
  if not possible_joins: