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 encoding/decoding REE Dicts when using streaming IPC #6399

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

brancz
Copy link
Contributor

@brancz brancz commented Sep 15, 2024

Which issue does this PR close?

Closes #6398

What changes are included in this PR?

Include dictionaries within REE dicts when recursively flattening all fields of a schema.

Are there any user-facing changes?

No, just a bug fix.

@alamb @tustvold

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @brancz -- this makes sense to me

I have one suggestion for the test, but otherwise 🚀


let mut decoder = StreamDecoder::new();
let buf = &mut Buffer::from(buffer.as_slice());
while let Some(_) = decoder
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should update the test to verify the Batch that comes back in matches the batch that was written -- aka that the data round trips

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, done!

@@ -375,6 +375,7 @@ impl Field {
| DataType::FixedSizeList(field, _)
| DataType::Map(field, _) => field.fields(),
DataType::Dictionary(_, value_field) => Field::_fields(value_field.as_ref()),
DataType::RunEndEncoded(_, field) => field.fields(),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@brancz
Copy link
Contributor Author

brancz commented Sep 18, 2024

Sorry for forgetting to cargo fmt, should be fixed now!

@alamb
Copy link
Contributor

alamb commented Sep 18, 2024

I am depressed about the large review backlog in this crate. We are looking for more help from the community reviewing PRs -- see #6418 for more

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @brancz

@alamb alamb merged commit e7598a4 into apache:master Sep 18, 2024
26 checks passed
@alamb
Copy link
Contributor

alamb commented Sep 18, 2024

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REE Dicts cannot be encoded/decoded with streaming IPC
2 participants