From d72f5213946db9a7e53d90cdacef2d08d732481b Mon Sep 17 00:00:00 2001 From: Xinyi Zou Date: Wed, 1 Nov 2023 21:00:02 +0800 Subject: [PATCH] 10 --- .../src/main/java/org/apache/doris/qe/ConnectProcessor.java | 2 +- .../doris/service/arrowflight/DorisFlightSqlProducer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java index 16813e5cf738ad3..c60f883e574b1c6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java @@ -275,7 +275,7 @@ protected void handleQuery(MysqlCommand mysqlCommand, String originStmt) { Preconditions.checkState(ctx.getFlightSqlChannel().resultNum() <= 1); if (ctx.getFlightSqlChannel().resultNum() == 1 && i != stmts.size() - 1) { LOG.warn( - "There can only be one stmt that returns the result and it is at the end. stmts.size(): " + "Only be one stmt that returns the result and it is at the end. stmts.size(): " + stmts.size()); ctx.getState().setError(ErrorCode.ERR_ARROW_FLIGHT_SQL_MUST_ONLY_RESULT_STMT, "stmts.size(): " + stmts.size()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlProducer.java b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlProducer.java index 54d686e5ff28757..6ea9531f0404490 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlProducer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlProducer.java @@ -32,7 +32,6 @@ import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Message; -import static java.util.UUID.randomUUID; import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils; import org.apache.arrow.flight.CallStatus; import org.apache.arrow.flight.Criteria; @@ -77,6 +76,7 @@ import java.util.Collections; import java.util.List; import java.util.Objects; +import java.util.UUID; public class DorisFlightSqlProducer implements FlightSqlProducer, AutoCloseable { private static final Logger LOG = LogManager.getLogger(DorisFlightSqlProducer.class); @@ -148,7 +148,7 @@ public FlightInfo getFlightInfoStatement(final CommandStatementQuery request, fi + connectContext.getState().getErrorMessage()).toRuntimeException(); } if (connectContext.getFlightSqlChannel().resultNum() == 0) { - String queryId = randomUUID().toString(); + String queryId = UUID.randomUUID().toString(); connectContext.getFlightSqlChannel().addEmptyResult(queryId, query); final ByteString handle = ByteString.copyFromUtf8(context.peerIdentity() + ":" + queryId);