Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4EF34200C01 for ; Thu, 5 Jan 2017 05:09:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4D9C9160B44; Thu, 5 Jan 2017 04:09:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BD368160B3A for ; Thu, 5 Jan 2017 05:09:04 +0100 (CET) Received: (qmail 98951 invoked by uid 500); 5 Jan 2017 04:08:58 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 98939 invoked by uid 99); 5 Jan 2017 04:08:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2017 04:08:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 724C12C03DB for ; Thu, 5 Jan 2017 04:08:58 +0000 (UTC) Date: Thu, 5 Jan 2017 04:08:58 +0000 (UTC) From: "Vineet Garg (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-15544) Support scalar subqueries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 05 Jan 2017 04:09:05 -0000 Vineet Garg created HIVE-15544: ---------------------------------- Summary: Support scalar subqueries Key: HIVE-15544 URL: https://issues.apache.org/jira/browse/HIVE-15544 Project: Hive Issue Type: Sub-task Components: SQL Reporter: Vineet Garg Assignee: Vineet Garg Currently HIVE only support IN/EXISTS/NOT IN/NOT EXISTS subqueries. HIVE doesn't allow sub-queries such as: {code} explain select a.ca_state state, count(*) cnt from customer_address a ,customer c ,store_sales s ,date_dim d ,item i where a.ca_address_sk = c.c_current_addr_sk and c.c_customer_sk = s.ss_customer_sk and s.ss_sold_date_sk = d.d_date_sk and s.ss_item_sk = i.i_item_sk and d.d_month_seq = (select distinct (d_month_seq) from date_dim where d_year = 2000 and d_moy = 2 ) and i.i_current_price > 1.2 * (select avg(j.i_current_price) from item j where j.i_category = i.i_category) group by a.ca_state having count(*) >= 10 order by cnt limit 100; {code} We initially plan to support such scalar subqueries in filter i.e. WHERE and HAVING -- This message was sent by Atlassian JIRA (v6.3.4#6332)