Skip to content

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.

@github-actions

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

</#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
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, LGTM

@lidavidm lidavidm merged commit e6da71e into apache:main Aug 5, 2025
@lidavidm
Copy link
Member

lidavidm commented Aug 5, 2025

argh...I forgot to reapprove workflows...let me fix thigns

lriggs pushed a commit to lriggs/arrow-java that referenced this pull request Oct 10, 2025
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 apache#725.
timhurskidremio pushed a commit to timhurskidremio/dremio-arrow-java that referenced this pull request Dec 5, 2025
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 apache#725.
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