This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch doris-jdk17
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/doris-jdk17 by this push:
new 6eceef6dc89 [fix](JDK17) The objects stored in `PriorityQueue` must
implement the `Comparable` interface (#30050)
6eceef6dc89 is described below
commit 6eceef6dc89f4c0037344301b2a151962a84b182
Author: Tiewei Fang <[email protected]>
AuthorDate: Mon Jan 22 20:44:26 2024 +0800
[fix](JDK17) The objects stored in `PriorityQueue` must implement the
`Comparable` interface (#30050)
---
.../org/apache/doris/resource/workloadgroup/QueueToken.java | 10 +++++++++-
.../array_functions/test_array_zip_array_enumerate_uniq.groovy | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/QueueToken.java
b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/QueueToken.java
index 17299d3ea3b..189ba77e8de 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/QueueToken.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/QueueToken.java
@@ -28,9 +28,14 @@ import java.util.concurrent.locks.ReentrantLock;
// used to mark QueryQueue offer result
// if offer failed, then need to cancel query
// and return failed reason to user client
-public class QueueToken {
+public class QueueToken implements Comparable<QueueToken> {
private static final Logger LOG = LogManager.getLogger(QueueToken.class);
+ @Override
+ public int compareTo(QueueToken other) {
+ return Long.compare(this.tokenId, other.getTokenId());
+ }
+
enum TokenState {
ENQUEUE_SUCCESS,
READY_TO_RUN
@@ -136,4 +141,7 @@ public class QueueToken {
return tokenId == other.tokenId;
}
+ public long getTokenId() {
+ return tokenId;
+ }
}
diff --git
a/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_zip_array_enumerate_uniq.groovy
b/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_zip_array_enumerate_uniq.groovy
index b8207c1ee76..38772921ece 100644
---
a/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_zip_array_enumerate_uniq.groovy
+++
b/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_zip_array_enumerate_uniq.groovy
@@ -25,7 +25,7 @@ suite("test_array_zip_array_enumerate_uniq", "p0") {
SELECT array_zip();
"""
} catch (Exception ex) {
- assertTrue(ex.getMessage().contains("errCode = 2, detailMessage =
Unexpected exception: 0"))
+ assertTrue(ex.getMessage().contains("errCode = 2, detailMessage =
Unexpected exception: "))
}
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]