Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 633A411D7A for ; Thu, 14 Aug 2014 04:56:18 +0000 (UTC) Received: (qmail 85932 invoked by uid 500); 14 Aug 2014 04:56:17 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 85821 invoked by uid 500); 14 Aug 2014 04:56:17 -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 85498 invoked by uid 500); 14 Aug 2014 04:56:17 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 85436 invoked by uid 99); 14 Aug 2014 04:56:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 04:56:17 +0000 Date: Thu, 14 Aug 2014 04:56:17 +0000 (UTC) From: "Harish Butani (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-7724) CBO: support Subquery predicates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-7724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096571#comment-14096571 ] Harish Butani commented on HIVE-7724: ------------------------------------- There are 2 options for this: * *Rewrite in Hive:* use the existing rewrite rules from Hive to convert _SubQuery_ predicates to equivalent Relational expressions. *# requires /SemiJoins/ to be supported. For e.g. with this path, the SemiJoin conversion for _in predicates_ throws an error in *ConvertMultiJoinRule* *# We miss out on Optiq's broader support of Subquery predicates ( multiple Subquery predicates in a QueryBlock, nested Subquery predicates etc.) *# preliminary patch is attached that works for Not-In (and probably not exists). Several tests for Not-In. Not-In/Not exists don't need SemiJoin. * *Use Optiq's Correlation RelNode:* *# Currently Optiq has infrastructure to construct a *Correlation RelNode*, and conversion to equivalent Relational expressions based on state maintained in _SqlNodeConverter_. This will have to be factored out of SqlNodeConverter. *# Need to investigate Optiq's rules to see if we need to add additional stuff. For e.g. [the Not In Null Check that Hive handles|https://issues.apache.org/jira/browse/HIVE-5830] > CBO: support Subquery predicates > -------------------------------- > > Key: HIVE-7724 > URL: https://issues.apache.org/jira/browse/HIVE-7724 > Project: Hive > Issue Type: Sub-task > Reporter: Harish Butani > Assignee: Harish Butani > Attachments: HIVE-7724.rewriteInHive.prelim.patch > > -- This message was sent by Atlassian JIRA (v6.2#6252)