You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/05 14:52:23 UTC
[GitHub] [arrow] markjschreiber opened a new issue, #14844: VectorValueComparator should skip the null test for NonNullable FieldTypes types
markjschreiber opened a new issue, #14844:
URL: https://github.com/apache/arrow/issues/14844
### Describe the enhancement requested
I recently ran a profiler on a simple implementation of a sort and noticed that the VectorValueComparator spends quite a lot of time checking the values to be compared for `null` values. In this case I had already declared the `FieldType` to be `notNullable`. Unless I am misunderstanding something, the values cannot be `null` so the comparator is making unnecessary and expensive comparisons.
As a test I made a comparator that skips the null tests and runs ~12% faster as a result. Based on this I think the `VectorValueComparator` should skip the `nul`l test for NonNullable `FieldTypes`.
I'd be happy to contribute a change to do this if you think it would be reasonable.
### Component(s)
Java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on issue #14844: [Java] VectorValueComparator should skip the null test for NonNullable FieldTypes types
Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #14844:
URL: https://github.com/apache/arrow/issues/14844#issuecomment-1339383390
IMO this would be reasonable. Additionally, I believe you can check for null or empty validity buffers and apply the optimization even if the type itself is not declared non-nullable. (At least, C++ doesn't allocate a validity buffer unless needed.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm closed issue #14844: [Java] VectorValueComparator should skip the null test for NonNullable FieldTypes types
Posted by GitBox <gi...@apache.org>.
lidavidm closed issue #14844: [Java] VectorValueComparator should skip the null test for NonNullable FieldTypes types
URL: https://github.com/apache/arrow/issues/14844
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org