!696 [I3B15B] Fix for CTAS creation with view

Merge pull request !696 from RajeevRastogi/jiraissuefix
This commit is contained in:
i-robot 2021-03-11 22:23:33 +08:00 committed by Gitee
commit 429bf7455d
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ class RelationPlanner
Type[] types = scope.getRelationType().getAllFields().stream().map(Field::getType).toArray(Type[]::new);
RelationPlan withCoercions = addCoercions(subPlan, types);
if ((!isCTEReuseEnabled(session) || getExecutionPolicy(session).equals("phased"))
|| (getCteMaxQueueSize(session) < getTaskConcurrency(session) * 2) || !((Query) analysis.getStatement()).getWith().isPresent()) {
|| (getCteMaxQueueSize(session) < getTaskConcurrency(session) * 2) || !(analysis.getStatement() instanceof Query) || !((Query) analysis.getStatement()).getWith().isPresent()) {
if (getCteMaxQueueSize(session) < getTaskConcurrency(session) * 2) {
LOG.info("Main queue size " + getCteMaxQueueSize(session) + "should be more than 2 times of concurrent task " + getTaskConcurrency(session));
}