You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2024/07/03 09:55:34 UTC
(doris) branch master updated: [fix](Nereids) partition not exists error msg is not contain table name (#37160)
This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d99b715ae3c [fix](Nereids) partition not exists error msg is not contain table name (#37160)
d99b715ae3c is described below
commit d99b715ae3cf5fff5bd1ab25f2342f38403ddf28
Author: morrySnow <10...@users.noreply.github.com>
AuthorDate: Wed Jul 3 17:55:27 2024 +0800
[fix](Nereids) partition not exists error msg is not contain table name (#37160)
intro by #36792
---
.../doris/nereids/rules/analysis/BindRelation.java | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java
index ddb0e199e8c..82945fb6963 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java
@@ -183,13 +183,13 @@ public class BindRelation extends OneAnalysisRuleFactory {
return getLogicalPlan(table, unboundRelation, qualifiedTablName, cascadesContext);
}
- private LogicalPlan makeOlapScan(TableIf table, UnboundRelation unboundRelation, List<String> qualifiedTableName) {
+ private LogicalPlan makeOlapScan(TableIf table, UnboundRelation unboundRelation, List<String> qualifier) {
LogicalOlapScan scan;
- List<Long> partIds = getPartitionIds(table, unboundRelation, qualifiedTableName);
+ List<Long> partIds = getPartitionIds(table, unboundRelation, qualifier);
List<Long> tabletIds = unboundRelation.getTabletIds();
if (!CollectionUtils.isEmpty(partIds) && !unboundRelation.getIndexName().isPresent()) {
scan = new LogicalOlapScan(unboundRelation.getRelationId(),
- (OlapTable) table, qualifiedTableName, partIds,
+ (OlapTable) table, qualifier, partIds,
tabletIds, unboundRelation.getHints(), unboundRelation.getTableSample());
} else {
Optional<String> indexName = unboundRelation.getIndexName();
@@ -205,13 +205,13 @@ public class BindRelation extends OneAnalysisRuleFactory {
: PreAggStatus.off("For direct index scan on mor/agg.");
scan = new LogicalOlapScan(unboundRelation.getRelationId(),
- (OlapTable) table, qualifiedTableName, tabletIds,
+ (OlapTable) table, qualifier, tabletIds,
CollectionUtils.isEmpty(partIds) ? ((OlapTable) table).getPartitionIds() : partIds, indexId,
preAggStatus, CollectionUtils.isEmpty(partIds) ? ImmutableList.of() : partIds,
unboundRelation.getHints(), unboundRelation.getTableSample());
} else {
scan = new LogicalOlapScan(unboundRelation.getRelationId(),
- (OlapTable) table, qualifiedTableName, tabletIds, unboundRelation.getHints(),
+ (OlapTable) table, qualifier, tabletIds, unboundRelation.getHints(),
unboundRelation.getTableSample());
}
}
@@ -354,7 +354,7 @@ public class BindRelation extends OneAnalysisRuleFactory {
return viewContext.getRewritePlan();
}
- private List<Long> getPartitionIds(TableIf t, UnboundRelation unboundRelation, List<String> qualifiedTableName) {
+ private List<Long> getPartitionIds(TableIf t, UnboundRelation unboundRelation, List<String> qualifier) {
List<String> parts = unboundRelation.getPartNames();
if (CollectionUtils.isEmpty(parts)) {
return ImmutableList.of();
@@ -367,12 +367,13 @@ public class BindRelation extends OneAnalysisRuleFactory {
return parts.stream().map(name -> {
Partition part = ((OlapTable) t).getPartition(name, unboundRelation.isTempPart());
if (part == null) {
- String qualified;
- if (!CollectionUtils.isEmpty(qualifiedTableName)) {
- qualified = String.join(".", qualifiedTableName);
+ List<String> qualified;
+ if (!CollectionUtils.isEmpty(qualifier)) {
+ qualified = qualifier;
} else {
- qualified = unboundRelation.getTableName();
+ qualified = Lists.newArrayList();
}
+ qualified.add(unboundRelation.getTableName());
throw new AnalysisException(String.format("Partition: %s is not exists on table %s",
name, String.join(".", qualified)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org