Skip to content

Commit

Permalink
Rename node visitor method to match typical pattern (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb authored Apr 10, 2024
1 parent 94ead4c commit 66b030a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion metricflow/dataflow/dataflow_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> Visi
pass

@abstractmethod
def visit_pass_elements_filter_node(self, node: FilterElementsNode) -> VisitorOutputT: # noqa: D102
def visit_filter_elements_node(self, node: FilterElementsNode) -> VisitorOutputT: # noqa: D102
pass

@abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion metricflow/dataflow/nodes/filter_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def distinct(self) -> bool:
return self._distinct

def accept(self, visitor: DataflowPlanNodeVisitor[VisitorOutputT]) -> VisitorOutputT: # noqa: D102
return visitor.visit_pass_elements_filter_node(self)
return visitor.visit_filter_elements_node(self)

@property
def description(self) -> str: # noqa: D102
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def visit_write_to_result_table_node( # noqa: D102
self._log_visit_node_type(node)
return self._handle_unsupported_node(node)

def visit_pass_elements_filter_node( # noqa: D102
def visit_filter_elements_node( # noqa: D102
self, node: FilterElementsNode
) -> ComputeMetricsBranchCombinerResult: # noqa: D102
self._log_visit_node_type(node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> Opti
self._log_visit_node_type(node)
return self._default_sink_node_handler(node)

def visit_pass_elements_filter_node(self, node: FilterElementsNode) -> OptimizeBranchResult: # noqa: D102
def visit_filter_elements_node(self, node: FilterElementsNode) -> OptimizeBranchResult: # noqa: D102
self._log_visit_node_type(node)
return self._default_base_output_handler(node)

Expand Down
2 changes: 1 addition & 1 deletion metricflow/plan_conversion/dataflow_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> SqlD
),
)

def visit_pass_elements_filter_node(self, node: FilterElementsNode) -> SqlDataSet:
def visit_filter_elements_node(self, node: FilterElementsNode) -> SqlDataSet:
"""Generates the query that realizes the behavior of FilterElementsNode."""
from_data_set: SqlDataSet = node.parent_node.accept(self)
output_instance_set = from_data_set.instance_set.transform(FilterElements(node.include_specs))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def visit_write_to_result_dataframe_node(self, node: WriteToResultDataframeNode)
def visit_write_to_result_table_node(self, node: WriteToResultTableNode) -> int: # noqa: D102
return self._sum_parents(node)

def visit_pass_elements_filter_node(self, node: FilterElementsNode) -> int: # noqa: D102
def visit_filter_elements_node(self, node: FilterElementsNode) -> int: # noqa: D102
return self._sum_parents(node)

def visit_combine_aggregated_outputs_node(self, node: CombineAggregatedOutputsNode) -> int: # noqa: D102
Expand Down

0 comments on commit 66b030a

Please sign in to comment.