Skip to content

Commit

Permalink
fix: struct field non-nullable type issue. (#914)
Browse files Browse the repository at this point in the history
* fix: struct field non-nullable type issue.

* update logic
  • Loading branch information
Genesis929 authored Aug 22, 2024
1 parent 64044e6 commit 149d5ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bigframes/core/compile/scalar_op_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,9 @@ def struct_field_op_impl(x: ibis_types.Value, op: ops.StructFieldOp):
name = op.name_or_index
else:
name = struct_value.names[op.name_or_index]
return struct_value[name].name(name)

result = struct_value[name]
return result.cast(result.type()(nullable=True)).name(name)


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

0 comments on commit 149d5ff

Please sign in to comment.