JinLiOnline opened a new issue #8337:
URL: https://github.com/apache/incubator-doris/issues/8337


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   master branch: 46ca23f21
   
   ### What's Wrong?
   
   **ERROR 1105 (HY000): NullPointerException, msg: null**
   
   java.lang.NullPointerException: null
           at 
org.apache.doris.qe.cache.PartitionCache.lambda$getCacheData$0(PartitionCache.java:99)
 ~[palo-fe.jar:0.15-SNAPSHOT]
           at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
           at 
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) 
~[?:?]
           at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
           at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) 
~[?:?]
           at 
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) 
~[?:?]
           at 
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
           at 
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[?:?]
           at 
org.apache.doris.qe.cache.PartitionCache.getCacheData(PartitionCache.java:101) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.cache.CacheAnalyzer.getCacheData(CacheAnalyzer.java:290) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.StmtExecutor.handleCacheStmt(StmtExecutor.java:815) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.StmtExecutor.handleQueryStmt(StmtExecutor.java:938) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:383) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:300) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:212) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:349) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:538) 
~[palo-fe.jar:0.15-SNAPSHOT]
           at 
org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50)
 ~[palo-fe.jar:0.15-SNAPSHOT]
           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:829) [?:?]
   
   ### What You Expected?
   
   no error
   
   ### How to Reproduce?
   
   ### ** table:** 
   
   `CREATE TABLE app_day (
     p_date date NOT NULL COMMENT "",  
     time_slot varchar(10) NOT NULL DEFAULT "" COMMENT "",  
     shop_id bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     product_id bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     country_code varchar(10) NOT NULL DEFAULT "" COMMENT "",  
     timezone varchar(30) NOT NULL DEFAULT "" COMMENT "",  
     timezone_offset int(11) NOT NULL DEFAULT "0" COMMENT "",  
     pay bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     pay_usd bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     cnt bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     show_cnt bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     click_cnt bigint(20) NOT NULL DEFAULT "0" COMMENT "",  
     live_click_cnt bigint(20) NOT NULL DEFAULT "0" COMMENT ""  
   ) ENGINE=OLAP  
   UNIQUE KEY(p_date, time_slot, shop_id, product_id)  
   COMMENT "OLAP"  
   PARTITION BY RANGE(p_date)  
   (PARTITION p20220213 VALUES [('2022-02-13'), ('2022-02-14')),  
   PARTITION p20220214 VALUES [('2022-02-14'), ('2022-02-15')),  
   PARTITION p20220215 VALUES [('2022-02-15'), ('2022-02-16')),  
   PARTITION p20220216 VALUES [('2022-02-16'), ('2022-02-17')),  
   PARTITION p20220217 VALUES [('2022-02-17'), ('2022-02-18')),  
   PARTITION p20220218 VALUES [('2022-02-18'), ('2022-02-19')),  
   PARTITION p20220219 VALUES [('2022-02-19'), ('2022-02-20')),  
   PARTITION p20220220 VALUES [('2022-02-20'), ('2022-02-21')),  
   PARTITION p20220221 VALUES [('2022-02-21'), ('2022-02-22')),  
   PARTITION p20220222 VALUES [('2022-02-22'), ('2022-02-23')),  
   PARTITION p20220223 VALUES [('2022-02-23'), ('2022-02-24')),  
   PARTITION p20220224 VALUES [('2022-02-24'), ('2022-02-25')),   
   PARTITION p20220225 VALUES [('2022-02-25'), ('2022-02-26')),   
   PARTITION p20220226 VALUES [('2022-02-26'), ('2022-02-27')),    
   PARTITION p20220227 VALUES [('2022-02-27'), ('2022-02-28')),   
   PARTITION p20220228 VALUES [('2022-02-28'), ('2022-03-01')),  
   PARTITION p20220301 VALUES [('2022-03-01'), ('2022-03-02')))   
   DISTRIBUTED BY HASH(shop_id, time_slot, product_id) BUCKETS 5   
   PROPERTIES (   
   "replication_num" = "1",   
   "dynamic_partition.enable" = "true",     
   "dynamic_partition.time_unit" = "DAY",    
   "dynamic_partition.start" = "-365",     
   "dynamic_partition.end" = "7",        
   "dynamic_partition.prefix" = "p",      
   "dynamic_partition.replication_num" = "1",   
   "dynamic_partition.buckets" = "5"   
   );`
   
   ### **data**
   
   `insert into app_day(p_date, time_slot, shop_id, pay) VALUES ('20220220', 
'1d', 7493989962821698638, 5);
   insert into app_day(p_date, time_slot, shop_id, pay) VALUES ('20220215', 
'1d', 7493989962821698638, 5);
   insert into app_day(p_date, time_slot, shop_id, pay) VALUES ('2022-02-16', 
'1d',7493989963020470246,0);
   `
   
   ### **sql**
   `set enable_partition_cache=1;
   SELECT   p_date,   sum(pay) AS sum_shop_product_pay_amt FROM   app_day WHERE 
    p_date BETWEEN '20220201' AND '20220221' and     time_slot = '1d'     AND 
shop_id = 7493989962821698638 GROUP BY   p_date;
   `
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

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

Reply via email to