Uh oh!
There was an error while loading. Please reload this page.
ARROW-5973: [Java] Variable width vectors' get methods should return null when the underlying data is null - #4901
ARROW-5973: [Java] Variable width vectors' get methods should return null when the underlying data is null#4901liyafan82 wants to merge 1 commit into
Conversation
Codecov Report
@@ Coverage Diff @@## master #4901 +/- ##
==========================================
+ Coverage 87.31% 89.58% +2.27%
==========================================
Files 894 661 -233 Lines 134066 96617 -37449 ==========================================
- Hits 117055 86553 -30502 + Misses 16659 10064 -6595 + Partials 352 0 -352Continue to review full report at Codecov.
|
emkornfield
commented
Jul 18, 2019
This seems like the right functionality. It looks like it impacts FixedSizeBinary as well (https://github.com/apache/arrow/blob/a222c7d4ddfa43ee35a6ecf1c1563b48ecd6b860/java/vector/src/main/java/org/apache/arrow/vector/FixedSizeBinaryVector.java) @praveenbingo@pravindra any concerns with the change in functionality? |
liyafan82
commented
Jul 18, 2019
@emkornfield Revised accordingly. Thanks a lot for your kind reminder. |
…null when the underlying data is null
emkornfield
commented
Jul 20, 2019
+1, we should start a list someplace so we don't forget for the next release behavior changes like this. So far I think we have:
|
liyafan82
commented
Jul 22, 2019
Good suggestion. Let's start a list in the mailing list. |
…null when the underlying data is null For variable-width vectors (VarCharVector and VarBinaryVector), when the validity bit is not set, it means the underlying data is null, so the get method should return null. However, the current implementation throws an IllegalStateException when NULL_CHECKING_ENABLED is set, or returns an empty array when the flag is clear. Maybe the purpose of this design is to be consistent with fixed-width vectors. However, the scenario is different: fixed-width vectors (e.g. IntVector) throw an IllegalStateException, simply because the primitive types are non-nullable. Author: liyafan82 <fan_li_ya@foxmail.com> Closes#4901 from liyafan82/fly_0717_varget and squashes the following commits: 8fe83f7 <liyafan82> Variable width vectors' get methods should return null when the underlying data is null
…null when the underlying data is null For variable-width vectors (VarCharVector and VarBinaryVector), when the validity bit is not set, it means the underlying data is null, so the get method should return null. However, the current implementation throws an IllegalStateException when NULL_CHECKING_ENABLED is set, or returns an empty array when the flag is clear. Maybe the purpose of this design is to be consistent with fixed-width vectors. However, the scenario is different: fixed-width vectors (e.g. IntVector) throw an IllegalStateException, simply because the primitive types are non-nullable. Author: liyafan82 <fan_li_ya@foxmail.com> Closesapache#4901 from liyafan82/fly_0717_varget and squashes the following commits: 8fe83f7 <liyafan82> Variable width vectors' get methods should return null when the underlying data is null
For variable-width vectors (VarCharVector and VarBinaryVector), when the validity bit is not set, it means the underlying data is null, so the get method should return null.
However, the current implementation throws an IllegalStateException when NULL_CHECKING_ENABLED is set, or returns an empty array when the flag is clear.
Maybe the purpose of this design is to be consistent with fixed-width vectors. However, the scenario is different: fixed-width vectors (e.g. IntVector) throw an IllegalStateException, simply because the primitive types are non-nullable.