skyyws opened a new issue, #35617:
URL: https://github.com/apache/doris/issues/35617

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.1.2
   
   ### What's Wrong?
   
   When open partition cache config, sql result cannot be cached in BE which 
lead to cache miss.
   I've read the FE code, the reason seems as following:
   1. setTooNewByID() been called in PartitionCache#getCacheData() for 
PartitionRange#partitionSingleList;
   2. RowBatchBuilder#cachePartMap empty when calling 
PartitionCache#buildPartitionIndex() due to single.isTooNew();
   3. Empty cachePartMap lead to InternalService.PUpdateCacheRequest#values_ 
empty in PartitionCache#updateCache()
   4. PUpdateCacheRequest#values_ empty, FE would not update cache in BE.
   
   So, partition cache also miss for same sql.
   
   
   ### What You Expected?
   
   Partition cache hit for same sql.
   
   ### How to Reproduce?
   
   set is_report_success=true;
   set enable_nereids_planner=false;
   set global enable_sql_cache=false;
   set global enable_partition_cache=true;
   select `date`,
          city,
          sum(cost)
   from demo.example_tbl
   where `date` >= '2017-10-01'
     and `date` <= '2017-10-01'
   group by 1,
            2;
   
   Test table is from doris document.
   
   ### 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.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