Skip to content

Conversation

@xxubai
Copy link
Contributor

@xxubai xxubai commented Sep 28, 2025

In data files, the UUID type is written as a fixed-length 16-byte binary.

Therefore, to correctly convert the UUID type when implementing a custom PartitionedFanoutWriter, it is necessary to add a corresponding converter.

For details, see the related issue: apache/amoro#3797

@github-actions github-actions bot added the data label Sep 28, 2025
import org.apache.iceberg.util.UUIDUtil;
import org.junit.jupiter.api.Test;

public class TestInternalRecordWrapper {
Copy link
Contributor

Choose a reason for hiding this comment

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

Great test coverage

Choose a reason for hiding this comment

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

I noticed there is an abstract test class for the wrapper classes: https://github.com/apache/iceberg/blob/main/data/src/test/java/org/apache/iceberg/RecordWrapperTestBase.java

Do you think we should extend it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure extending it wouldn’t add much value in this case.

import org.apache.iceberg.util.UUIDUtil;
import org.junit.jupiter.api.Test;

public class TestInternalRecordWrapper {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure extending it wouldn’t add much value in this case.

@xxubai
Copy link
Contributor Author

xxubai commented Oct 16, 2025

Hi @pvary , could you take a quick look at this PR?

@pvary
Copy link
Contributor

pvary commented Oct 16, 2025

@xxubai: Could we add a test which covers the original issue with the FanoutWriter?

@xxubai xxubai force-pushed the fix-uuid-for-internal-record-wrapper branch from eed1e2a to 12ab952 Compare October 16, 2025 09:21
@xxubai
Copy link
Contributor Author

xxubai commented Oct 16, 2025

@xxubai: Could we add a test which covers the original issue with the FanoutWriter?

Thanks @pvary.I added a test to fix this issue by using a PartitionedAppendWriter to write UUID records.


@ParameterizedTest
@ValueSource(strings = {"parquet", "orc"})
public void testWriteUuidWithFountWriter(String format) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is running without the change.
Any ideas why?

@github-actions
Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 16, 2025
@github-actions
Copy link

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants