Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](analyzer) fixed the NullPointerException (#43269)
Browse files Browse the repository at this point in the history
dtkavin committed Nov 18, 2024
1 parent 514a17e commit 5f33eaf
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -430,13 +430,18 @@ private List<CacheTable> buildCacheTableList() {
}

public InternalService.PFetchCacheResult getCacheData() throws UserException {
if (parsedStmt instanceof LogicalPlanAdapter) {
cacheMode = innerCheckCacheModeForNereids(0);
} else if (parsedStmt instanceof SelectStmt) {
cacheMode = innerCheckCacheMode(0);
} else if (parsedStmt instanceof SetOperationStmt) {
cacheMode = innerCheckCacheModeSetOperation(0);
} else {
try {
if (parsedStmt instanceof LogicalPlanAdapter) {
cacheMode = innerCheckCacheModeForNereids(0);
} else if (parsedStmt instanceof SelectStmt) {
cacheMode = innerCheckCacheMode(0);
} else if (parsedStmt instanceof SetOperationStmt) {
cacheMode = innerCheckCacheModeSetOperation(0);
} else {
return null;
}
} catch (NullPointerException e) {
LOG.error("getCacheData error", e);
return null;
}

0 comments on commit 5f33eaf

Please sign in to comment.