API reference
python:irx:irx.record_batch.RecordBatchSchema.add_struct_field
method add_struct_field
add_struct_field(name: str, fields: Sequence[tuple[str, IrxColumnType]], nullable: bool = True) -> 'RecordBatchSchema'
Source: packages/irx/src/irx/record_batch.py:734
Add a struct column with the given named fixed-width fields.
Each field is a (name, type) pair whose type must be one of the fixed-width primitive or temporal types (see _STRUCT_FIELD_CTYPE); bool, utf8, and nested field types are not supported yet.
Parameters
-
name โ Name identifying the declaration or operation.; Type: str
-
fields โ Declared fields.; Type: Sequence[tuple[str, IrxColumnType]]
-
nullable โ Whether null values are permitted.; Type: bool
Returns
Result of this operation: add a struct column with the given named fixed-width fields.; Type: 'RecordBatchSchema'