File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
java/vector/src/main/java/org/apache/arrow/vector/complex Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2828import org .apache .arrow .memory .BaseAllocator ;
2929import org .apache .arrow .memory .BufferAllocator ;
3030import org .apache .arrow .memory .OutOfMemoryException ;
31+ import org .apache .arrow .memory .util .ByteFunctionHelpers ;
3132import org .apache .arrow .util .Preconditions ;
3233import org .apache .arrow .vector .AddOrGetResult ;
3334import org .apache .arrow .vector .BitVectorHelper ;
@@ -422,7 +423,7 @@ public int hashCode(int index) {
422423 final int start = offsetBuffer .getInt (index * OFFSET_WIDTH );
423424 final int end = offsetBuffer .getInt ((index + 1 ) * OFFSET_WIDTH );
424425 for (int i = start ; i < end ; i ++) {
425- hash = 31 * vector .hashCode (i );
426+ hash = ByteFunctionHelpers . comebineHash ( hash , vector .hashCode (i ) );
426427 }
427428 return hash ;
428429 }
Original file line number Diff line number Diff line change 2626import java .util .Map ;
2727
2828import org .apache .arrow .memory .BufferAllocator ;
29+ import org .apache .arrow .memory .util .ByteFunctionHelpers ;
2930import org .apache .arrow .util .Preconditions ;
3031import org .apache .arrow .vector .DensityAwareVector ;
3132import org .apache .arrow .vector .FieldVector ;
@@ -294,7 +295,7 @@ public int hashCode(int index) {
294295 for (String child : getChildFieldNames ()) {
295296 ValueVector v = getChild (child );
296297 if (v != null && index < v .getValueCount ()) {
297- hash += 31 * hash + v .hashCode (index );
298+ hash = ByteFunctionHelpers . comebineHash ( hash , v .hashCode (index ) );
298299 }
299300 }
300301 return hash ;
You can’t perform that action at this time.
0 commit comments