Skip to content

Commit 149d5ff

Browse files
authored
fix: struct field non-nullable type issue. (#914)
* fix: struct field non-nullable type issue. * update logic
1 parent 64044e6 commit 149d5ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bigframes/core/compile/scalar_op_compiler.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,9 @@ def struct_field_op_impl(x: ibis_types.Value, op: ops.StructFieldOp):
754754
name = op.name_or_index
755755
else:
756756
name = struct_value.names[op.name_or_index]
757-
return struct_value[name].name(name)
757+
758+
result = struct_value[name]
759+
return result.cast(result.type()(nullable=True)).name(name)
758760

759761

760762
def numeric_to_datetime(x: ibis_types.Value, unit: str) -> ibis_types.TimestampValue:

0 commit comments

Comments
 (0)