You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/12/06 19:59:22 UTC
[GitHub] [parquet-mr] alexeykudinkin commented on a change in pull request #940: [PARQUET-2106] Refactoring lexicographic `BinaryComparator` to avoid `ByteBuffer.wrap` in the hot-path
alexeykudinkin commented on a change in pull request #940:
URL: https://github.com/apache/parquet-mr/pull/940#discussion_r763340453
##########
File path: parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveComparator.java
##########
@@ -183,10 +183,10 @@ public String toString() {
private static abstract class BinaryComparator extends PrimitiveComparator<Binary> {
@Override
int compareNotNulls(Binary o1, Binary o2) {
- return compare(o1.toByteBuffer(), o2.toByteBuffer());
+ return compareBinary(o1, o2);
}
- abstract int compare(ByteBuffer b1, ByteBuffer b2);
+ abstract int compareBinary(Binary b1, Binary b2);
Review comment:
The `Binary` refers to a class not an object, hence it feels more natural as `compareBinary`
--
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: dev-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org