You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2018/08/24 06:21:00 UTC
[jira] [Commented] (HIVE-20452) DPP: Simple n-tuple expressions
support
[ https://issues.apache.org/jira/browse/HIVE-20452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16591202#comment-16591202 ]
Gopal V commented on HIVE-20452:
--------------------------------
[~djaiswal]: the concat is probably a bit weird to figure out as a synthetic predicate, but the other two are the core feature parts.
> DPP: Simple n-tuple expressions support
> ---------------------------------------
>
> Key: HIVE-20452
> URL: https://issues.apache.org/jira/browse/HIVE-20452
> Project: Hive
> Issue Type: Improvement
> Components: Tez
> Affects Versions: 4.0.0
> Reporter: Gopal V
> Assignee: Deepak Jaiswal
> Priority: Major
>
> {code}
> create table sales (s_qty bigint, s_item_sk bigint) partitioned by(s_region string, s_date date);
> insert into sales partition(s_region='USA', s_date='2018-01-01') values (1,1), (2,2);
> insert into sales partition(s_region='EU', s_date='2018-02-01') values (1,1), (2,2);
> {code}
> {code}
> select count(*) from sales s, agg_sales a where concat(a.s_region, '^', a.s_date) = concat(s.s_region, '^', s.s_date) and s.sold_qty > a.median_s_qty and a.s_item_sk = s.s_item_sk;
> select count(*) from sales s, agg_sales a where (a.s_region, a.s_date) = (s.s_region, s.s_date) and s.sold_qty > a.median_s_qty and a.s_item_sk = s.s_item_sk;
> select count(*) from sales s, agg_sales a where a.s_region = s.s_region and a.s_date = s.s_date and s.sold_qty > a.median_s_qty and a.s_item_sk = s.s_item_sk;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)