Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ private List<Comparable> composeExportJobInfo(ExportJob job) {
infoMap.put("tablet_num", job.getTabletsNum());
infoMap.put("max_file_size", job.getMaxFileSize());
infoMap.put("delete_existing_files", job.getDeleteExistingFiles());
infoMap.put("parallelism", job.getParallelism());
infoMap.put("data_consistency", job.getDataConsistency());
jobInfo.add(new Gson().toJson(infoMap));
// path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
import org.apache.doris.qe.AutoCloseConnectContext;
import org.apache.doris.qe.ConnectContext;
import org.apache.doris.qe.OriginStatement;
import org.apache.doris.qe.QueryState.MysqlStateType;
import org.apache.doris.qe.StmtExecutor;
import org.apache.doris.scheduler.exception.JobException;
Expand All @@ -41,7 +40,6 @@

import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -135,13 +133,7 @@ public void execute() throws JobException {
}

try (AutoCloseConnectContext r = buildConnectContext()) {
StatementBase statementBase = selectStmtLists.get(idx);
OriginStatement originStatement = new OriginStatement(
StringUtils.isEmpty(statementBase.getOrigStmt().originStmt)
? exportJob.getOrigStmt().originStmt : statementBase.getOrigStmt().originStmt, idx);
statementBase.setOrigStmt(originStatement);
stmtExecutor = new StmtExecutor(r.connectContext, statementBase);

stmtExecutor = new StmtExecutor(r.connectContext, selectStmtLists.get(idx));
stmtExecutor.execute();
if (r.connectContext.getState().getStateType() == MysqlStateType.ERR) {
exportJob.updateExportJobState(ExportJobState.CANCELLED, taskId, null,
Expand Down Expand Up @@ -178,6 +170,9 @@ private AutoCloseConnectContext buildConnectContext() {
ConnectContext connectContext = new ConnectContext();
exportJob.getSessionVariables().setQueryTimeoutS(exportJob.getTimeoutSecond());
connectContext.setSessionVariable(exportJob.getSessionVariables());
// The rollback to the old optimizer is prohibited
// Since originStmt is empty, reverting to the old optimizer when the new optimizer is enabled is meaningless.
connectContext.getSessionVariable().enableFallbackToOriginalPlanner = false;
connectContext.setEnv(Env.getCurrentEnv());
connectContext.setDatabase(exportJob.getTableName().getDb());
connectContext.setQualifiedUser(exportJob.getQualifiedUser());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ private ExportJob generateExportJob(ConnectContext ctx, Map<String, String> file
exportJob.setTableName(tblName);
exportJob.setExportTable(table);
exportJob.setTableId(table.getId());
if (ctx.getExecutor() != null) {
exportJob.setOrigStmt(ctx.getExecutor().getOriginStmt());
}
// set partitions
exportJob.setPartitionNames(this.partitionsNames);
// set where expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public enum ConnectType {

private StatsErrorEstimator statsErrorEstimator;

private Map<String, String> resultAttachedInfo;
private Map<String, String> resultAttachedInfo = Maps.newHashMap();

private String workloadGroupName = "";
private Map<Long, Backend> insertGroupCommitTableToBeMap = new HashMap<>();
Expand Down