This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit c5b7a8c959f874c6a63e769a1e44b43e539d40bd
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Fri Apr 12 12:34:27 2024 +0800

    [opt](Nereids) support select async mv partition (#33560)
---
 .../java/org/apache/doris/nereids/rules/analysis/BindRelation.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 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 397d53b78a2..0aac17cff9b 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
@@ -331,15 +331,15 @@ public class BindRelation extends OneAnalysisRuleFactory {
         if (CollectionUtils.isEmpty(parts)) {
             return ImmutableList.of();
         }
-        if (!t.getType().equals(TableIf.TableType.OLAP)) {
-            throw new IllegalStateException(String.format(
+        if (!t.isManagedTable()) {
+            throw new AnalysisException(String.format(
                     "Only OLAP table is support select by partition for now,"
                             + "Table: %s is not OLAP table", t.getName()));
         }
         return parts.stream().map(name -> {
             Partition part = ((OlapTable) t).getPartition(name, 
unboundRelation.isTempPart());
             if (part == null) {
-                throw new IllegalStateException(String.format("Partition: %s 
is not exists", name));
+                throw new AnalysisException(String.format("Partition: %s is 
not exists", name));
             }
             return part.getId();
         }).collect(ImmutableList.toImmutableList());


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to