Skip to content

Commit 8f841e5

Browse files
committed
fix mypy
1 parent 565a963 commit 8f841e5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bigframes/operations/ai_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

bigframes/operations/output_schemas.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)