You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2014/11/18 22:33:33 UTC
[jira] [Commented] (HIVE-8907) Partition Condition Remover doesn't
remove conditions involving cast on partition column
[ https://issues.apache.org/jira/browse/HIVE-8907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14216822#comment-14216822 ]
Ashutosh Chauhan commented on HIVE-8907:
----------------------------------------
It runs into this if-block of {{PcrExprProcFactory}}
{code}
if (result == null) {
// if the result is not boolean and not all partition agree on the
// result, we don't remove the condition. Potentially, it can miss
// the case like "where ds % 3 == 1 or ds % 3 == 2"
// TODO: handle this case by making result vector to handle all
// constant values.
return new NodeInfoWrapper(WalkState.UNKNOWN, null, getOutExpr(fd, nodeOutputs));
{code}
> Partition Condition Remover doesn't remove conditions involving cast on partition column
> ----------------------------------------------------------------------------------------
>
> Key: HIVE-8907
> URL: https://issues.apache.org/jira/browse/HIVE-8907
> Project: Hive
> Issue Type: Improvement
> Components: Logical Optimizer
> Reporter: Ashutosh Chauhan
> Fix For: 0.14.0
>
>
> e.g,
> {code}
> create table partition_test_partitioned(key string, value string) partitioned by (dt string)
> explain select * from partition_test_partitioned where cast(dt as double) >=100.0 and cast(dt as double) <= 102.0
> {code}
> For queries like above, although {{PartitionPruner}} is able to prune partitions correctly, filter is still not optimized away by PCR, where it could.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)