Skip to content

Conversation

@lidavidm
Copy link
Member

@lidavidm lidavidm commented Jul 8, 2020

This also enables Flight to write differing metadata versions.

Not implemented: any checks for unions in read/write based on metadata version.

I refactored TestFileWriter very heavily as I wanted to ensure IpcOptions was thoroughly tested and didn't want to duplicate code. I hope this doesn't make the change too hard to review.

@github-actions
Copy link

github-actions bot commented Jul 8, 2020

@pitrou
Copy link
Member

pitrou commented Jul 8, 2020

Does Java already implement the required IPC union layout and semantics? Otherwise perhaps we should defer this PR until the union work is done.

@lidavidm
Copy link
Member Author

lidavidm commented Jul 8, 2020

We should wait for #7290, yes. (Is anyone reviewing it?)

Also, this now checks the metadata version against the schema before writing.

@lidavidm lidavidm changed the title ARROW-9362: [Java] Increment default MetadataVersion to V5 ARROW-9362: [Java] Support reading/writing V4 MetadataVersion Jul 9, 2020
@lidavidm
Copy link
Member Author

Would any Java maintainers be able to review? There's a bit of a circular dependency with this and #7290 - this is needed so that C++ will see the V5 metadata version and read with the right buffer layout, then #7290 will actually correct the buffer layout and enable the tests.

Copy link
Contributor

@rymurr rymurr left a comment

Choose a reason for hiding this comment

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

LGTM. Awesome to get this in!

I like the DFS, I suppose the recursive algorithm wont cause a problem for any normal schema.

Copy link
Member

@BryanCutler BryanCutler left a comment

Choose a reason for hiding this comment

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

LGTM. I mostly looked at the vector ipc and tests, and just had a minor question.

Copy link
Member

Choose a reason for hiding this comment

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

doesn't this need an IpcOption to set MetadataVersion.V4?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thank you. I've added the IpcOption.

Copy link
Member

@BryanCutler BryanCutler left a comment

Choose a reason for hiding this comment

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

LGTM

@BryanCutler
Copy link
Member

So is this ok to merge before #7290 ?

@lidavidm
Copy link
Member Author

So is this ok to merge before #7290 ?

This should be OK. It doesn't enable unions in the integration tests and prevents reading/writing unions with the old version. (Of course, someone could build master and start writing files with V5 metadata and the wrong union layout?)

@wesm wesm changed the title ARROW-9362: [Java] Support reading/writing V4 MetadataVersion ARROW-9362: [Java] Support reading/writing V5 MetadataVersion Jul 11, 2020
@wesm wesm closed this in fe541e8 Jul 11, 2020
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
This also enables Flight to write differing metadata versions.

Not implemented: any checks for unions in read/write based on metadata version.

I refactored TestFileWriter very heavily as I wanted to ensure IpcOptions was thoroughly tested and didn't want to duplicate code. I hope this doesn't make the change too hard to review.

Closes apache#7685 from lidavidm/arrow-9362

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: Wes McKinney <wesm@apache.org>
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