Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bigframes/core/compile/scalar_op_compiler.py

Lines changed: 3 additions & 1 deletion
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)