xinghuayu007 opened a new issue #5726: URL: https://github.com/apache/incubator-doris/issues/5726
**Describe the bug** When a query executed with cache enabled, it returns error: 2021-04-26 16:18:25,898 WARN (doris-mysql-nio-pool-3|156) [StmtExecutor.execute():337] execute Exception `java.lang.NullPointerException: null at org.apache.doris.qe.cache.CacheProxy$FetchCacheResult.setResult(CacheProxy.java:229) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.cache.CacheBeProxy.fetchCache(CacheBeProxy.java:97) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.cache.SqlCache.getCacheData(SqlCache.java:44) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.cache.CacheAnalyzer.getCacheData(CacheAnalyzer.java:280) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.handleCacheStmt(StmtExecutor.java:646) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.handleQueryStmt(StmtExecutor.java:737) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:273) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:192) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:324) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:509) ~[palo-fe.jar:3.4.0] at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50) ~[palo-fe.jar:3.4.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]` **To Reproduce** Steps to reproduce the behavior: 1. create a table with 3 more partitions, set enable_sql_cache=true:  2. insert some data into partition p201707, this partition becomes the lastest partition  3. query twice this table, the cache has been planted.  4. insert some data into partition p201709, this partition becomes the lastest partition  5. query twice this table, the cache has been planted.  6. insert some data into partition p201708, this partition becomes the lastest partition  9. quey this table, return error  **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org