This is an automated email from the ASF dual-hosted git repository.
huajianlan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 04bef055911 [fix](analyzer) fixed the NullPointerException (#43269)
(#44161)
04bef055911 is described below
commit 04bef055911803b709af285067439957fd26e376
Author: John Zhang <[email protected]>
AuthorDate: Mon Nov 18 18:47:12 2024 +0800
[fix](analyzer) fixed the NullPointerException (#43269) (#44161)
cherry-pick: #43269
---
.../java/org/apache/doris/qe/cache/CacheAnalyzer.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
index 389c5406fe2..35ad7ccb189 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
@@ -430,13 +430,18 @@ public class CacheAnalyzer {
}
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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]