Skip to content

fix: Return an empty write payload when Arrow conversion receives a zero-row Table #6796

Description

@obielin

Both _convert_arrow_fv_to_proto and _convert_arrow_odfv_to_proto convert a pyarrow.Table by indexing table.to_batches()[0]. A valid zero-row Arrow table has no record batches, so either helper raises IndexError instead of returning the natural empty write payload ([]).\n\nThe public write APIs reject empty DataFrames, but these conversion helpers are also used on provider/remote paths and should handle their valid input consistently. Return early for zero-row Tables before accessing the first batch.\n\nA focused regression test covers normal FeatureView and OnDemandFeatureView conversion paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions