Skip to content

Commit

Permalink
[chore](MTMV) catch all exception when get mtmvs to avoid plan failed (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
morrySnow authored and Your Name committed Jan 7, 2025
1 parent aef3b54 commit 056a8aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Set<MTMV> getAvailableMTMVs(List<BaseTableInfo> 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);
}
Expand All @@ -107,7 +107,7 @@ public Set<MTMV> getAllMTMVs(List<BaseTableInfo> 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);
}
Expand Down

0 comments on commit 056a8aa

Please sign in to comment.