Skip to content

ARROW-13645 [Java]: Allow NullVectors to have distinct field names#10949

Closed
liyafan82 wants to merge 1 commit into
apache:masterfrom
liyafan82:fly_0817_zr
Closed

ARROW-13645 [Java]: Allow NullVectors to have distinct field names#10949
liyafan82 wants to merge 1 commit into
apache:masterfrom
liyafan82:fly_0817_zr

Conversation

@liyafan82

@liyafan82 liyafan82 commented Aug 17, 2021

Copy link
Copy Markdown
Contributor

As discussed in the ML (https://lists.apache.org/thread.html/r19aad8a34f63334d3fcd627106f69be13f689740b83930a4eecc17b3%40%3Cdev.arrow.apache.org%3E), the current implementation use hard-coded field names. This may cause some problems, for example, when reconstruct a usable schema from a list of FieldVectors.

So we resolve this problem by allowing NullVectors to have distinct field names.

This also makes the NullVector consistent with other types of vectors.

@github-actions

Copy link
Copy Markdown

@kiszk

kiszk commented Aug 18, 2021

Copy link
Copy Markdown
Member

LGTM
nit: The last line of the description may have a typo, This also makes the ZeroVector with other types of vectors. looks correct based on the change.

@liyafan82

Copy link
Copy Markdown
Contributor Author

LGTM
nit: The last line of the description may have a typo, This also makes the ZeroVector with other types of vectors. looks correct based on the change.

@kiszk Thanks for your feedback. I have updated the description accordingly.

@kiszk

kiszk commented Aug 23, 2021

Copy link
Copy Markdown
Member

I still see NullVector instead of ZeroVector. But, it is nit.

@liyafan82

Copy link
Copy Markdown
Contributor Author

I still see NullVector instead of ZeroVector. But, it is nit.

@kiszk Thanks for your careful review.
According to the current implementation, ZeroVector is a sub-class of NullVector, and the patch applies to both ZeroVector and NullVector. So I used the more general term (NullVector) here.

@liyafan82 liyafan82 closed this in 55812c8 Aug 26, 2021
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
As discussed in the ML (https://lists.apache.org/thread.html/r19aad8a34f63334d3fcd627106f69be13f689740b83930a4eecc17b3%40%3Cdev.arrow.apache.org%3E), the current implementation use hard-coded field names. This may cause some problems, for example, when reconstruct a usable schema from a list of FieldVectors.

So we resolve this problem by allowing NullVectors to have distinct field names.

This also makes the `NullVector` consistent with other types of vectors.

Closes apache#10949 from liyafan82/fly_0817_zr

Authored-by: liyafan82 <fan_li_ya@foxmail.com>
Signed-off-by: liyafan82 <fan_li_ya@foxmail.com>
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.

2 participants