From 056a8aac4f440be6367a3272bdbfd254d1711f21 Mon Sep 17 00:00:00 2001 From: morrySnow Date: Tue, 7 Jan 2025 15:57:40 +0800 Subject: [PATCH] [chore](MTMV) catch all exception when get mtmvs to avoid plan failed (#46474) ### What problem does this PR solve? Related PR: #28144 #45045 Problem Summary: if getTable return Table is not MTMV, ClassCastException raised and lead to plan failed. --- .../main/java/org/apache/doris/mtmv/MTMVRelationManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelationManager.java b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelationManager.java index f8f92e25d38d65..f3939cb47eafd8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelationManager.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelationManager.java @@ -90,7 +90,7 @@ public Set getAvailableMTMVs(List tableInfos, ConnectContex if (isMVPartitionValid(mtmv, ctx, forceConsistent)) { res.add(mtmv); } - } catch (AnalysisException e) { + } catch (Exception e) { // not throw exception to client, just ignore it LOG.warn("getTable failed: {}", tableInfo.toString(), e); } @@ -107,7 +107,7 @@ public Set getAllMTMVs(List tableInfos) { for (BaseTableInfo tableInfo : mvInfos) { try { mtmvs.add((MTMV) MTMVUtil.getTable(tableInfo)); - } catch (AnalysisException e) { + } catch (Exception e) { // not throw exception to client, just ignore it LOG.warn("getTable failed: {}", tableInfo.toString(), e); }