diff --git a/src/gateway/converter/substrait_plan_visitor.py b/src/gateway/converter/substrait_plan_visitor.py index 0b44594..2c4cdf8 100644 --- a/src/gateway/converter/substrait_plan_visitor.py +++ b/src/gateway/converter/substrait_plan_visitor.py @@ -175,12 +175,12 @@ def visit_record(self, record: algebra_pb2.Expression.MultiOrList.Record) -> Any for field in record.fields: self.visit_expression(field) - def visit_if_value(self, if_clause: algebra_pb2.Expression.SwitchExpression.IfValue) -> Any: + def visit_if_value(self, if_value: algebra_pb2.Expression.SwitchExpression.IfValue) -> Any: """Visits an if value.""" - if if_clause.HasField('if'): - self.visit_literal(getattr(if_clause, 'if')) - if if_clause.HasField('then'): - self.visit_expression(if_clause.then) + if if_value.HasField('if'): + self.visit_literal(getattr(if_value, 'if')) + if if_value.HasField('then'): + self.visit_expression(if_value.then) def visit_struct(self, structure: type_pb2.Type.Struct) -> Any: """Visits a struct."""