From 08c3e00245caa44dcde2d65fe3895cd0e6f6ed68 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Thu, 7 Nov 2024 18:20:54 -0800 Subject: [PATCH] fixup! Align Dataflow Plans --- metricflow/dataflow/builder/dataflow_plan_builder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metricflow/dataflow/builder/dataflow_plan_builder.py b/metricflow/dataflow/builder/dataflow_plan_builder.py index 85aea277c..d41d22d04 100644 --- a/metricflow/dataflow/builder/dataflow_plan_builder.py +++ b/metricflow/dataflow/builder/dataflow_plan_builder.py @@ -1735,7 +1735,7 @@ def _build_pre_aggregation_plan( queried_linkable_specs: Optional[LinkableSpecSet] = None, distinct: bool = False, ) -> DataflowPlanNode: - # TODO: docstring + """Adds standard pre-aggegation steps after building source node and before aggregation.""" output_node = source_node if join_targets: output_node = JoinOnEntitiesNode.create(left_node=output_node, join_targets=join_targets) @@ -1762,7 +1762,7 @@ def _build_pre_aggregation_plan( output_node = self._build_semi_additive_join_node( measure_properties=measure_properties, queried_linkable_specs=queried_linkable_specs, - current_node=output_node, + parent_node=output_node, ) output_node = FilterElementsNode.create( @@ -1775,7 +1775,7 @@ def _build_semi_additive_join_node( self, measure_properties: MeasureSpecProperties, queried_linkable_specs: LinkableSpecSet, - current_node: DataflowPlanNode, + parent_node: DataflowPlanNode, ) -> SemiAdditiveJoinNode: non_additive_dimension_spec = measure_properties.non_additive_dimension_spec assert ( @@ -1799,7 +1799,7 @@ def _build_semi_additive_join_node( LinklessEntitySpec.from_element_name(name) for name in non_additive_dimension_spec.window_groupings ) return SemiAdditiveJoinNode.create( - parent_node=current_node, + parent_node=parent_node, entity_specs=window_groupings, time_dimension_spec=time_dimension_spec, agg_by_function=non_additive_dimension_spec.window_choice,