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: allow nullable field of equality delete writer #834

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZENOTME
Copy link
Contributor

@ZENOTME ZENOTME commented Dec 23, 2024

According to the doc fixed in apache/iceberg#8981, the equality delete writer can have an optional field id. This PR fixes this.

@ZENOTME
Copy link
Contributor Author

ZENOTME commented Dec 23, 2024

cc @liurenjie1024 @Fokko @Xuanwo @sdd I think this PR is ready to go

@@ -148,8 +150,11 @@ impl RecordBatchProjector {
))?
.column(*idx)
.clone();
null_buffer = NullBuffer::union(null_buffer.as_ref(), array.logical_nulls().as_ref());
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need to do this? I assume if parent struct element is null, its child is also null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. E.g. in

vec![Arc::new(Int32Array::from(vec![Some(1), Some(2), None]))],
, for the second value of struct, the parent struct element is null but it's child actually has valid element.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some test for more deeply nested struct type? For example struct(struct(int))?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I have add it.

liurenjie1024
liurenjie1024 previously approved these changes Jan 24, 2025
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @ZENOTME for fixing this, generally LGTM, just left a small question.

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

Successfully merging this pull request may close these issues.

2 participants