-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-37702: [Java] Add vector validation consistent with C++ #37942
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
Conversation
|
The NullVector and FixedSizeBinaryVector checks may not really be valuable. It doesn't look like it's possible to get these vectors in a state where these checks can fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldThrow is a bit of an awkward API; it seems like there's not that much logic here, and we could just duplicate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added checkPrecisionAndScaleNoThrow() to replace this overload.
Make vector validation more consistent with Array::Validate() in C++: * Add validate() and validateFull() instance methods to vectors. * Validate that VarCharVector and LargeVarCharVector contents are valid UTF-8. * Validate that DecimalVector and Decimal256Vector contents fit within the supplied precision and scale. * Validate that NullVectors contain only nulls. * Validate that FixedSizeBinaryVector values have the correct length.
16ed64e to
055924d
Compare
|
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit a004102. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them. |
…che#37942) ### Rationale for this change Make vector validation code more consistent with C++. Add missing checks and have the entry point be the same so that the code is easier to read/write when working with both languages. ### What changes are included in this PR? Make vector validation more consistent with Array::Validate() in C++: * Add validate() and validateFull() instance methods to vectors. * Validate that VarCharVector and LargeVarCharVector contents are valid UTF-8. * Validate that DecimalVector and Decimal256Vector contents fit within the supplied precision and scale. * Validate that NullVectors contain only nulls. * Validate that FixedSizeBinaryVector values have the correct length. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#37702 Authored-by: James Duong <duong.james@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
…che#37942) ### Rationale for this change Make vector validation code more consistent with C++. Add missing checks and have the entry point be the same so that the code is easier to read/write when working with both languages. ### What changes are included in this PR? Make vector validation more consistent with Array::Validate() in C++: * Add validate() and validateFull() instance methods to vectors. * Validate that VarCharVector and LargeVarCharVector contents are valid UTF-8. * Validate that DecimalVector and Decimal256Vector contents fit within the supplied precision and scale. * Validate that NullVectors contain only nulls. * Validate that FixedSizeBinaryVector values have the correct length. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#37702 Authored-by: James Duong <duong.james@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
…che#37942) ### Rationale for this change Make vector validation code more consistent with C++. Add missing checks and have the entry point be the same so that the code is easier to read/write when working with both languages. ### What changes are included in this PR? Make vector validation more consistent with Array::Validate() in C++: * Add validate() and validateFull() instance methods to vectors. * Validate that VarCharVector and LargeVarCharVector contents are valid UTF-8. * Validate that DecimalVector and Decimal256Vector contents fit within the supplied precision and scale. * Validate that NullVectors contain only nulls. * Validate that FixedSizeBinaryVector values have the correct length. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#37702 Authored-by: James Duong <duong.james@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Rationale for this change
Make vector validation code more consistent with C++. Add missing checks and have the entry point
be the same so that the code is easier to read/write when working with both languages.
What changes are included in this PR?
Make vector validation more consistent with Array::Validate() in C++:
Are these changes tested?
Yes.
Are there any user-facing changes?
No.