@@ -32,55 +32,14 @@ def lower(self, expr: expression.OpExpression) -> expression.Expression:
3232 func_def = expr .op .function_def
3333 devirtualized_expr = ops .RemoteFunctionOp (
3434 func_def .with_devirtualize (),
35- apply_on_null = expr .op .apply_on_null ,
3635 ).as_expr (* expr .children )
3736 if isinstance (func_def .signature .output , udf_def .VirtualListTypeV1 ):
3837 return func_def .signature .output .out_expr (devirtualized_expr )
3938 else :
4039 return devirtualized_expr
4140
4241
43- @dataclasses .dataclass
44- class LowerBinaryRemoteFunctionRule (op_lowering .OpLoweringRule ):
45- @property
46- def op (self ) -> type [ops .ScalarOp ]:
47- return ops .BinaryRemoteFunctionOp
48-
49- def lower (self , expr : expression .OpExpression ) -> expression .Expression :
50- assert isinstance (expr .op , ops .BinaryRemoteFunctionOp )
51- func_def = expr .op .function_def
52- devirtualized_expr = ops .BinaryRemoteFunctionOp (
53- func_def .with_devirtualize (),
54- ).as_expr (* expr .children )
55- if isinstance (func_def .signature .output , udf_def .VirtualListTypeV1 ):
56- return func_def .signature .output .out_expr (devirtualized_expr )
57- else :
58- return devirtualized_expr
59-
60-
61- @dataclasses .dataclass
62- class LowerNaryRemoteFunctionRule (op_lowering .OpLoweringRule ):
63- @property
64- def op (self ) -> type [ops .ScalarOp ]:
65- return ops .NaryRemoteFunctionOp
66-
67- def lower (self , expr : expression .OpExpression ) -> expression .Expression :
68- assert isinstance (expr .op , ops .NaryRemoteFunctionOp )
69- func_def = expr .op .function_def
70- devirtualized_expr = ops .NaryRemoteFunctionOp (
71- func_def .with_devirtualize (),
72- ).as_expr (* expr .children )
73- if isinstance (func_def .signature .output , udf_def .VirtualListTypeV1 ):
74- return func_def .signature .output .out_expr (devirtualized_expr )
75- else :
76- return devirtualized_expr
77-
78-
79- UDF_LOWERING_RULES = (
80- LowerRemoteFunctionRule (),
81- LowerBinaryRemoteFunctionRule (),
82- LowerNaryRemoteFunctionRule (),
83- )
42+ UDF_LOWERING_RULES = (LowerRemoteFunctionRule (),)
8443
8544
8645def lower_udfs (root : bigframe_node .BigFrameNode ) -> bigframe_node .BigFrameNode :
0 commit comments