[chore](topn-opt) temporary disable two phase read for TableQueryPlanActionQ (#22543)

This commit is contained in:
lihangyu
2023-08-04 11:53:48 +08:00
committed by GitHub
parent ed6bb1fc9d
commit d3cab017ec
2 changed files with 10 additions and 0 deletions

View File

@ -122,6 +122,12 @@ public class TableQueryPlanAction extends RestBaseController {
}
table.readLock();
try {
if (ConnectContext.get() != null
&& ConnectContext.get().getSessionVariable() != null) {
// Disable some optimizations, since it's not fully supported
// TODO support it
ConnectContext.get().getSessionVariable().setEnableTwoPhaseReadOpt(false);
}
// parse/analysis/plan the sql and acquire tablet distributions
handleQuery(ConnectContext.get(), fullDbName, tblName, sql, resultMap);
} finally {

View File

@ -1241,6 +1241,10 @@ public class SessionVariable implements Serializable, Writable {
return queryTimeoutS;
}
public void setEnableTwoPhaseReadOpt(boolean enable) {
enableTwoPhaseReadOpt = enable;
}
public int getMaxExecutionTimeMS() {
return maxExecutionTimeMS;
}