File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
paimon-core/src/main/java/org/apache/paimon/mergetree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1919package org .apache .paimon .mergetree ;
2020
2121import org .apache .paimon .annotation .VisibleForTesting ;
22- import org .apache .paimon .data .BinaryRow ;
2322import org .apache .paimon .data .InternalRow ;
2423import org .apache .paimon .io .DataFileMeta ;
24+ import org .apache .paimon .utils .Preconditions ;
2525
2626import java .util .Collections ;
2727import java .util .Comparator ;
@@ -87,13 +87,9 @@ public long totalSize() {
8787 @ VisibleForTesting
8888 public void validate (Comparator <InternalRow > comparator ) {
8989 for (int i = 1 ; i < files .size (); i ++) {
90- BinaryRow minKey = files .get (i ).minKey ();
91- BinaryRow maxKey = files .get (i - 1 ).maxKey ();
92- if (comparator .compare (minKey , maxKey ) <= 0 ) {
93- throw new IllegalArgumentException (
94- "SortedRun is not sorted and may contain overlapping key intervals. "
95- + "This is a bug." );
96- }
90+ Preconditions .checkState (
91+ comparator .compare (files .get (i ).minKey (), files .get (i - 1 ).maxKey ()) > 0 ,
92+ "SortedRun is not sorted and may contain overlapping key intervals. This is a bug." );
9793 }
9894 }
9995
You can’t perform that action at this time.
0 commit comments