Skip to content

Commit

Permalink
[fix](analyzer) fixed the NullPointerException (#43269) (#44162)
Browse files Browse the repository at this point in the history
cherry-pick: #43269
  • Loading branch information
dtkavin authored Nov 18, 2024
1 parent e9116e6 commit 449e9d6
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,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;
}

Expand Down

0 comments on commit 449e9d6

Please sign in to comment.