Skip to content

Commit fe5aa75

Browse files
starocean999BiteTheDDDDt
authored andcommitted
fix create mtmv task fail
1 parent 76d7ef8 commit fe5aa75

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

fe/fe-core/src/main/java/org/apache/doris/catalog/RecursiveCteTempTable.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919

2020
import org.apache.doris.common.SystemIdGenerator;
2121

22+
import com.google.common.collect.ImmutableList;
23+
2224
import java.util.List;
2325

2426
public class RecursiveCteTempTable extends Table {
2527
public RecursiveCteTempTable(String tableName, List<Column> fullSchema) {
2628
super(SystemIdGenerator.getNextId(), tableName, TableType.RECURSIVE_CTE_TEMP_TABLE, fullSchema);
2729
}
30+
31+
@Override
32+
public List<String> getFullQualifiers() {
33+
return ImmutableList.of(name);
34+
}
2835
}

fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ private LogicalPlan bindWithCurrentDb(CascadesContext cascadesContext, UnboundRe
174174
}
175175
}
176176
LogicalPlan scan;
177-
List<String> tableQualifier = RelationUtil.getQualifierName(
178-
cascadesContext.getConnectContext(), unboundRelation.getNameParts());
179177
if (tableName.equalsIgnoreCase(cascadesContext.getCurrentRecursiveCteName().orElse(""))) {
180178
if (cascadesContext.isAnalyzingRecursiveCteAnchorChild()) {
181179
throw new AnalysisException(
@@ -188,8 +186,10 @@ private LogicalPlan bindWithCurrentDb(CascadesContext cascadesContext, UnboundRe
188186
}
189187
RecursiveCteTempTable cteTempTable = new RecursiveCteTempTable(tableName, schema.build());
190188
scan = new LogicalRecursiveCteScan(cascadesContext.getStatementContext().getNextRelationId(),
191-
cteTempTable, tableQualifier);
189+
cteTempTable, unboundRelation.getNameParts());
192190
} else {
191+
List<String> tableQualifier = RelationUtil.getQualifierName(
192+
cascadesContext.getConnectContext(), unboundRelation.getNameParts());
193193
TableIf table = cascadesContext.getStatementContext().getAndCacheTable(tableQualifier, TableFrom.QUERY,
194194
Optional.of(unboundRelation));
195195

0 commit comments

Comments
 (0)