Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure to save files when split table contains no data #2007

Merged
merged 3 commits into from
May 2, 2023
Merged

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Apr 29, 2023

Fixes:

What

The root cause of the problem was arrow failing to concatenate if there was no data in the table. This checks for that condition and bypasses the serialize_data_column call all together.

Added new test that fails with same conditions:

test data_store_dump_empty_column ... FAILED

failures:

---- data_store_dump_empty_column stdout ----
thread 'data_store_dump_empty_column' panicked at 'called `Result::unwrap()` on an `Err` value: Arrow(InvalidArgumentError("concat requires input of at least one array"))', crates/re_arrow_store/tests/dump.rs:296:26

Checklist

PR Build Summary: https://build.rerun.io/pr/2007

@jleibs jleibs requested a review from teh-cmc April 29, 2023 20:05
@jleibs jleibs marked this pull request as ready for review April 29, 2023 20:05
@jleibs jleibs added the 🪳 bug Something isn't working label Apr 29, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice with a regression test of this too, if it is not too much trouble.

I think we should merge this into main first, then cherry-pick it into a 0.5.1 branch. This will ensure it ends up correctly in the changelog (and that it gets main-lined quicker)

@jleibs jleibs changed the base branch from hotfix-0.5.1 to main May 1, 2023 21:43
@jleibs
Copy link
Member Author

jleibs commented May 1, 2023

Ok, rebased to main so we can cherry-pick back to hotfix.
I could definitely use a hand from @teh-cmc figuring out how to actually trigger this in a regression test.
I introduced a unit test that replicates the problem, but could definitely use a sanity check from @teh-cmc
I think this has something to do with introducing a table that starts with an element that then gets split?

] => 3; [instances2, points2]);
let mut table = DataTable::from_rows(TableId::random(), [row1, row2]);
table.compute_all_size_bytes();
store.insert_table(&table).ok();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should crash on errors in tests, no?

here and below

Suggested change
store.insert_table(&table).ok();
store.insert_table(&table).unwrap();

@emilk emilk mentioned this pull request May 2, 2023
@jleibs jleibs merged commit 68a295b into main May 2, 2023
@jleibs jleibs deleted the bugfix-2005 branch May 2, 2023 13:25
jleibs added a commit that referenced this pull request May 2, 2023
The root cause of the problem was arrow failing to concatenate if there was no data in the table. This checks for that condition and bypasses the serialize_data_column call all together.
jleibs added a commit that referenced this pull request May 2, 2023
The root cause of the problem was arrow failing to concatenate if there was no data in the table. This checks for that condition and bypasses the serialize_data_column call all together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants