[
https://issues.apache.org/jira/browse/HIVE-17405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150025#comment-16150025
]
liyunzhang_intel commented on HIVE-17405:
-----------------------------------------
[~stakiar]: why need remove following query in original file?
{code}
-- different file format
create table srcpart_orc (key int, value string) partitioned by (ds string, hr
int) stored as orc;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.vectorized.execution.enabled=false;
set hive.exec.max.dynamic.partitions=1000;
insert into table srcpart_orc partition (ds, hr) select key, value, ds, hr from
srcpart;
EXPLAIN select count(*) from srcpart_orc join srcpart_date_hour on
(srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr =
srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and
(srcpart_date_hour.`date` = '2008-04-08' or srcpart_date_hour.`date` =
'2008-04-09');
select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds =
srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where
srcpart_date_hour.hour = 11 and (srcpart_date_hour.`date` = '2008-04-08' or
srcpart_date_hour.`date` = '2008-04-09');
select count(*) from srcpart where (ds = '2008-04-08' or ds = '2008-04-09') and
hr = 11;
drop table srcpart_orc;
{code}
> HoS DPP ConstantPropagate should use ConstantPropagateOption.SHORTCUT
> ---------------------------------------------------------------------
>
> Key: HIVE-17405
> URL: https://issues.apache.org/jira/browse/HIVE-17405
> Project: Hive
> Issue Type: Sub-task
> Components: Spark
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Attachments: HIVE-17405.1.patch, HIVE-17405.2.patch,
> HIVE-17405.3.patch, HIVE-17405.4.patch, HIVE-17405.5.patch,
> HIVE-17405.6.patch, HIVE-17405.7.patch
>
>
> In {{SparkCompiler#runDynamicPartitionPruning}} we should change {{new
> ConstantPropagate().transform(parseContext)}} to {{new
> ConstantPropagate(ConstantPropagateOption.SHORTCUT).transform(parseContext)}}
> Hive-on-Tez does the same thing.
> Running the full constant propagation isn't really necessary, we just want to
> eliminate any {{and true}} predicates that were introduced by
> {{SyntheticJoinPredicate}} and {{DynamicPartitionPruningOptimization}}. The
> {{SyntheticJoinPredicate}} will introduce dummy filter predicates into the
> operator tree, and {{DynamicPartitionPruningOptimization}} will replace them.
> The predicates introduced via {{SyntheticJoinPredicate}} are necessary to
> help {{DynamicPartitionPruningOptimization}} determine if DPP can be used or
> not.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)