This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 20fec76eb4d branch-4.1: [fix](view) Skip dangling views when querying
information_schema.view_dependency #67339 (#67377)
20fec76eb4d is described below
commit 20fec76eb4d00601bfd34a3085a186dffa5d4df6
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Sep 6 07:48:49 2026 +0800
branch-4.1: [fix](view) Skip dangling views when querying
information_schema.view_dependency #67339 (#67377)
Cherry-picked from #67339
Co-authored-by: yujun <[email protected]>
---
.../org/apache/doris/tablefunction/MetadataGenerator.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
index 619f8748962..5b785d85aa9 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
@@ -1017,7 +1017,16 @@ public class MetadataGenerator {
continue;
}
String inlineViewDef = ((View) table).getInlineViewDef();
- Map<List<String>, TableIf> tablesMap =
PlanUtils.tableCollect(inlineViewDef, ctx);
+ Map<List<String>, TableIf> tablesMap;
+ try {
+ tablesMap = PlanUtils.tableCollect(inlineViewDef, ctx);
+ } catch (Exception e) {
+ // A view may reference tables that no longer exist
(dangling view).
+ // Skip it so the whole metadata query does not fail.
+ LOG.warn("Failed to collect base tables of view {} in
database {}, skip it. exception: {}",
+ tableName, dbName, e);
+ continue;
+ }
for (Map.Entry<List<String>, TableIf> info :
tablesMap.entrySet()) {
List<String> fullName = info.getKey();
TableIf tbl = info.getValue();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]