Skip to content

Commit

Permalink
10
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Nov 1, 2023
1 parent e348132 commit d72f521
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d72f521

Please sign in to comment.