Skip to content

Commit

Permalink
Don't drop parent attributes when joining to custom granularity (#1439)
Browse files Browse the repository at this point in the history
An oversight when building this SQL rendering logic - we were dropping
some of the SQL select node attributes from the dataset when joining to
time spine. This fixes that.
I'm not actually sure of what query scenario might have this attributes
before the custom granularity join, so this is more of a "just in case"
fix.
  • Loading branch information
courtneyholcomb authored Oct 2, 2024
1 parent d507cfe commit 975446b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metricflow/plan_conversion/dataflow_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,11 @@ def visit_join_to_custom_granularity_node(self, node: JoinToCustomGranularityNod
from_source=parent_data_set.checked_sql_select_node.from_source,
from_source_alias=parent_alias,
join_descs=parent_data_set.checked_sql_select_node.join_descs + (join_description,),
where=parent_data_set.checked_sql_select_node.where,
group_bys=parent_data_set.checked_sql_select_node.group_bys,
order_bys=parent_data_set.checked_sql_select_node.order_bys,
limit=parent_data_set.checked_sql_select_node.limit,
distinct=parent_data_set.checked_sql_select_node.distinct,
),
)

Expand Down

0 comments on commit 975446b

Please sign in to comment.