fix: handle empty tables in get_add_actions()#3922
Conversation
|
ACTION NEEDED delta-rs follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
f723817 to
01e5e8e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3922 +/- ##
==========================================
- Coverage 74.19% 74.17% -0.02%
==========================================
Files 152 152
Lines 39552 39554 +2
Branches 39552 39554 +2
==========================================
- Hits 29346 29340 -6
- Misses 8879 8885 +6
- Partials 1327 1329 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4572dc7 to
5dffd72
Compare
|
can someone look into this please? The build complains about formatting but locally it doesnt throw that error |
|
@vsmanish1772 what version of Rust are you building with? CI runs with 1.91 or whatever is stable, but I see the issues with 1.90 as well |
- Fix panic when get_add_actions() is called on tables with no add actions - Return empty RecordBatch with correct schema instead of panicking - Add unit test to verify get_add_actions() works after delete and vacuum Fixes delta-io#3918 Signed-off-by: Manish Sogiyawar <msogiyawar@vectra.ai>
Signed-off-by: Manish Sogiyawar <msogiyawar@vectra.ai>
@rtyler I'm using rustc 1.91.0 (f8297e351 2025-10-28) |
3680d0d to
765ba81
Compare
See delta-io#3918 Signed-off-by: R. Tyler Croy <rtyler@brokenco.de>
8d1eae8 to
c5a285f
Compare
Description
This PR fixes a panic that occurs when
get_add_actions()is called on a Delta table that has no add actions (i.e., no data files).Problem
When calling
get_add_actions()on a table with no files, the function panics with:This happens because the code attempts to access
results[0]without checking if theresultsvector is empty.Solution
Changes
Testing
Fixes #3918