Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix]fix npe issue for external table (backport #51767) #51870

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ private Table copyTable(Table originalTable) {
}
}

// The conception is not very clear, be careful when use it.
private static class ExternalTableCollector extends TableCollector {
List<Table> tables;
Predicate<Table> predicate;
Expand All @@ -712,9 +713,7 @@ public ExternalTableCollector(List<Table> tables, Predicate<Table> filter) {
@Override
public Void visitTable(TableRelation node, Void context) {
Table table = node.getTable();
boolean internal = CatalogMgr.isInternalCatalog(table.getCatalogName())
|| table.isNativeTableOrMaterializedView()
|| table.isOlapView();
boolean internal = table.isNativeTableOrMaterializedView() || table.isOlapView();
if (!internal && predicate.test(table)) {
tables.add(table);
}
Expand Down
Loading