Skip to content

Commit

Permalink
9
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Nov 1, 2023
1 parent 7a74612 commit e348132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
17 changes: 5 additions & 12 deletions fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,11 @@

import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.protobuf.Any;
import com.google.protobuf.ByteString;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;
import io.opentelemetry.context.propagation.TextMapGetter;
import org.apache.arrow.flight.CallStatus;
import org.apache.arrow.flight.FlightEndpoint;
import org.apache.arrow.flight.FlightInfo;
import org.apache.arrow.flight.Location;
import org.apache.arrow.flight.Ticket;
import org.apache.arrow.flight.sql.impl.FlightSql.TicketStatementQuery;
import org.apache.arrow.vector.types.pojo.Schema;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -81,7 +72,6 @@
import java.io.StringReader;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -284,8 +274,11 @@ 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(): " + stmts.size());
ctx.getState().setError(ErrorCode.ERR_ARROW_FLIGHT_SQL_MUST_ONLY_RESULT_STMT, "stmts.size(): " + stmts.size());
LOG.warn(
"There can 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());
ctx.getState().setErrType(QueryState.ErrType.OTHER_ERR);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.google.common.base.Preconditions;
import com.google.protobuf.Any;
import com.google.protobuf.ByteString;
import static com.google.protobuf.ByteString.copyFrom;
import com.google.protobuf.Message;
import static java.util.UUID.randomUUID;
import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
Expand Down Expand Up @@ -143,8 +142,10 @@ public FlightInfo getFlightInfoStatement(final CommandStatementQuery request, fi

flightSQLConnectProcessor.handleQuery(query);
if (connectContext.getState().getStateType() == MysqlStateType.ERR) {
throw CallStatus.INTERNAL.withDescription("get flight info statement failed, error code: " + connectContext.getState().getErrorCode() + ", error msg: "
+ connectContext.getState().getErrorMessage()).toRuntimeException();
throw CallStatus.INTERNAL.withDescription(
"get flight info statement failed, error code: " + connectContext.getState().getErrorCode()
+ ", error msg: "
+ connectContext.getState().getErrorMessage()).toRuntimeException();
}
if (connectContext.getFlightSqlChannel().resultNum() == 0) {
String queryId = randomUUID().toString();
Expand Down

0 comments on commit e348132

Please sign in to comment.