You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arrow.enable_null_check_for_get causes change in the behavior of VarBinaryVector#getObject #469
When I set arrow.enable_null_check_for_get to true, this test passes. However, when I set arrow.enable_null_check_for_get to false, it failed.
org.opentest4j.AssertionFailedError:
Expected :null
Actual :[B@73e9cf30
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertNull.failNotNull(AssertNull.java:50)
at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:35)
at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:30)
at org.junit.jupiter.api.Assertions.assertNull(Assertions.java:279)
at demo.MainTest.testVarbinary(MainTest.java:27)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Why does BigIntVector's getObject always return null, while VarBinary Vector's getObject has a different behavior?
Because you've disabled null checking entirely, so VarBinaryVector takes it as an opportunity to skip the null check and return whatever string data happens to be in that slot (even though the slot is meant to be null, it can still have data allocated, though it is probably an empty string). BigIntVector doesn't have that optimization.
Activity
lidavidm commentedon Jan 3, 2025
Because you've disabled null checking entirely, so VarBinaryVector takes it as an opportunity to skip the null check and return whatever string data happens to be in that slot (even though the slot is meant to be null, it can still have data allocated, though it is probably an empty string). BigIntVector doesn't have that optimization.
lidavidm commentedon Jan 3, 2025
Arguably, in this case, BigIntVector should also be returning non-null.
aqni commentedon Jan 6, 2025
Is there any plan in the future to unify the behavior of
getObjectwhenarrow.enable_null_check_for_getis set to false?lidavidm commentedon Jan 6, 2025
Contributions would be welcome. I don't think anyone is actively working on it.
GH-469: Unify `ValueVector.getObject` and `VariableWidthFieldVector.g…