feast-dev / feast-dev/feast

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

Open Beginner friendly
#6,796 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.3k
Forks
1.4k
Avg merge
1d 21h
Merged PRs (30d)
15

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating _convert_arrow_fv_to_proto and _convert_arrow_odfv_to_proto, then inspect the focused regression test covering normal FeatureView and OnDemandFeatureView conversions. Verify that zero-row pyarrow.Tables return [] without indexing a batch, while normal conversions still pass the test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.