Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Feb 12, 2024
1 parent 7a2c1b8 commit d1939b7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
import com.google.protobuf.ByteString;
import com.google.protobuf.ProtocolStringList;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.thrift.TException;
Expand Down Expand Up @@ -1112,7 +1113,8 @@ private void parseByLegacy() throws AnalysisException, DdlException {
// parsedStmt may already by set when constructing this StmtExecutor();
if (parsedStmt == null) {
// Parse statement with parser generated by CUP&FLEX
SqlScanner input = new SqlScanner(new StringReader(originStmt.originStmt),
SqlScanner input = new SqlScanner(new StringReader(StringUtils.isEmpty(originStmt.originStmt)
? context.getExecutor().getOriginStmtInString() : originStmt.originStmt),
context.getSessionVariable().getSqlMode());
SqlParser parser = new SqlParser(input);
try {
Expand Down

0 comments on commit d1939b7

Please sign in to comment.