JingsongLi commented on code in PR #4385:
URL: https://github.com/apache/paimon/pull/4385#discussion_r1820073272
##########
paimon-common/src/main/java/org/apache/paimon/CoreOptions.java:
##########
@@ -609,6 +609,13 @@ public class CoreOptions implements Serializable {
"The field that generates the sequence number for
primary key table,"
+ " the sequence number determines which
data is the most recent.");
+ @Immutable
+ public static final ConfigOption<Boolean> SEQUENCE_FIELD_SORT_IS_ASCENDING
=
+ key("sequence.field.sort.is.ascending")
Review Comment:
sequence.field.sort-order
##########
paimon-core/src/main/java/org/apache/paimon/operation/MergeFileSplitRead.java:
##########
@@ -338,6 +338,6 @@ private RecordReader<KeyValue>
projectOuter(RecordReader<KeyValue> reader) {
@Nullable
public UserDefinedSeqComparator createUdsComparator() {
return UserDefinedSeqComparator.create(
- readerFactoryBuilder.readValueType(), sequenceFields);
+ readerFactoryBuilder.readValueType(), sequenceFields, true);
Review Comment:
Why here pass true?
##########
paimon-core/src/main/java/org/apache/paimon/sort/BinaryExternalSortBuffer.java:
##########
@@ -120,7 +120,7 @@ public static BinaryExternalSortBuffer create(
int maxNumFileHandles,
CompressOptions compression,
MemorySize maxDiskSize) {
- RecordComparator comparator =
newRecordComparator(rowType.getFieldTypes(), keyFields);
+ RecordComparator comparator =
newRecordComparator(rowType.getFieldTypes(), keyFields, true);
Review Comment:
Why here pass true?
##########
paimon-common/src/main/java/org/apache/paimon/CoreOptions.java:
##########
@@ -609,6 +609,13 @@ public class CoreOptions implements Serializable {
"The field that generates the sequence number for
primary key table,"
+ " the sequence number determines which
data is the most recent.");
+ @Immutable
+ public static final ConfigOption<Boolean> SEQUENCE_FIELD_SORT_IS_ASCENDING
=
Review Comment:
Introduce SortOrder:
ASCENDING, DESCENDING
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]