From 730cc49127111eacb2ba9246ec2c970543804e4b Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Tue, 24 Sep 2024 06:44:32 -0700 Subject: [PATCH] Remove unneeded DATE_TRUNC logic for custom grain join --- metricflow/plan_conversion/dataflow_to_sql.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index 0623fc49ef..51276297c9 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -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,