File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class AIGenerate(base_ops.NaryOp):
3737
3838 def output_type (self , * input_types : dtypes .ExpressionType ) -> dtypes .ExpressionType :
3939 if self .output_schema is None :
40- output_fields = [ pa .field ("result" , pa .string ())]
40+ output_fields = ( pa .field ("result" , pa .string ()),)
4141 else :
4242 output_fields = output_schemas .parse_sql_fields (self .output_schema )
4343
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ def parse_sql_type(sql: str) -> pa.DataType:
4949
5050 if sql .startswith ("STRUCT<" ) and sql .endswith (">" ):
5151 inner_fields = parse_sql_fields (sql [len ("STRUCT<" ) : - 1 ])
52- return pa .struct (parse_sql_fields (inner_fields ))
52+
53+ return pa .struct (sorted (inner_fields , key = lambda f :f .name ))
5354
5455 raise ValueError (f"Unsupported SQL type: { sql } " )
5556
You can’t perform that action at this time.
0 commit comments