Skip to content

GH-725: Added ExtensionReader #726

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

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

Conversation

xxlaykxx
Copy link
Contributor

What's Changed

ExtensionReader was added to support reading extension types from a complex vector.
It contains read(ExtensionHolder) method for reading to the holder. And readObject - for reading the value explicitly.

Closes #725.

This comment has been minimized.

@lidavidm lidavidm added the enhancement PRs that add or improve features. label Apr 23, 2025
@xxlaykxx xxlaykxx marked this pull request as ready for review April 23, 2025 16:24
@github-actions github-actions bot added this to the 18.3.0 milestone Apr 23, 2025
@jbonofre
Copy link
Member

Thanks for the PR, let me take a look.

@xxlaykxx
Copy link
Contributor Author

xxlaykxx commented May 5, 2025

@jbonofre @lidavidm could someone plz take a look?

@jbonofre
Copy link
Member

jbonofre commented May 5, 2025

@xxlaykxx sure. I will.

@jbonofre jbonofre modified the milestones: 18.3.0, 18.4.0 May 8, 2025
@xxlaykxx
Copy link
Contributor Author

xxlaykxx commented Jun 2, 2025

still need review, plz

@@ -108,6 +108,23 @@ public void copyAsField(String name, ${name}Writer writer) {
}

</#list></#list>

public void read(ExtensionHolder holder) {
fail("Extension");
Copy link
Member

Choose a reason for hiding this comment

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

It might be clearer to use the signature as the error message (like other methods do below)?

public void read(ExtensionHolder holder) {
UuidHolder uuidHolder = (UuidHolder) holder;
vector.get(idx(), uuidHolder);
}
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we need to override the other methods in AbstractFieldReader?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added annotation

Copy link
Member

Choose a reason for hiding this comment

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

read(int arrayIndex, ExtensionHolder holder), copyAsValue, copyAsField still aren't implemented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added read, copyAsValue. copyAsField can't find any usage for other classes where this impl exists.

FieldReader uuidReader = rootReader.reader("uuid1");
uuidReader.setPosition(0);
UuidHolder uuidHolder = new UuidHolder();
uuidReader.read(uuidHolder);
Copy link
Member

Choose a reason for hiding this comment

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

Similarly we test read but not the other methods?

Copy link
Member

Choose a reason for hiding this comment

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

read(int arrayIndex, ExtensionHolder holder), copyAsValue, copyAsField aren't tested?

Copy link
Contributor Author

@xxlaykxx xxlaykxx Jun 24, 2025

Choose a reason for hiding this comment

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

Added tests with read and copyAsValue usage. For copyAsField, there are no examples of how it should be used, so not sure what is the right test case for it.

@xxlaykxx xxlaykxx requested a review from lidavidm June 11, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that add or improve features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Vector] Add support of Extension type for vector readers
3 participants