Skip to content

Commit

Permalink
Remove unneeded DATE_TRUNC logic for custom grain join
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Sep 24, 2024
1 parent f636c63 commit 730cc49
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions metricflow/plan_conversion/dataflow_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,11 +1451,6 @@ def visit_join_to_custom_granularity_node(self, node: JoinToCustomGranularityNod
left_expr_for_join: SqlExpressionNode = SqlColumnReferenceExpression.from_table_and_column_names(
table_alias=parent_alias, column_name=parent_time_dimension_instance.associated_column.column_name
)
if parent_time_dimension_instance.spec.time_granularity.base_granularity != time_spine_source.base_granularity:
# If needed, apply DATE_TRUNC to parent column match the time spine spine that's column being joined to.
left_expr_for_join = SqlDateTruncExpression.create(
time_granularity=time_spine_source.base_granularity, arg=left_expr_for_join
)
join_description = SqlJoinDescription(
right_source=SqlTableNode.create(sql_table=time_spine_source.spine_table),
right_source_alias=time_spine_alias,
Expand Down

0 comments on commit 730cc49

Please sign in to comment.