[ 
https://issues.apache.org/jira/browse/HIVE-21817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855327#comment-16855327
 ] 

Gopal V commented on HIVE-21817:
--------------------------------

Do you have a FIL following a TS?

The simplest pattern looks like 

{code}
select count(1) from calls  c where year_partition=2018 and date_time_date 
between DATE'2018-01-01' and DATE'2018-02-01';
{code}

My benchmark has 86 thousand queries, not every query is hitting this - so I'll 
try to narrow down the queries which hit this, but the specific call is coming 
from the PCR which detects a TS+FIL 

I have a generic call-trace, which goes backwards from

https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/pcr/PcrOpProcFactory.java#L110
+
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java#L124

 !pcr-cache-miss.png! 

> CBO: PartitionPruner cache-miss from Calcite planner
> ----------------------------------------------------
>
>                 Key: HIVE-21817
>                 URL: https://issues.apache.org/jira/browse/HIVE-21817
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Gopal V
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>         Attachments: calcite-ppr.png, pcr-cache-miss.png
>
>
>  !calcite-ppr.png! 
> {code}
> public static PrunedPartitionList prune(Table tab, ExprNodeDesc prunerExpr,
>       HiveConf conf, String alias, Map<String, PrunedPartitionList> 
> prunedPartitionsMap)
>           throws SemanticException {
> vs
>   public PrunedPartitionList getPrunedPartitions(String alias, 
> TableScanOperator ts)
>       throws SemanticException {
>     PrunedPartitionList partsList = opToPartList.get(ts);
> {code}
> Only the 2nd one hits the PPR cache.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to