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 8D4712009F3 for ; Fri, 20 May 2016 17:25:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8BCF7160A0E; Fri, 20 May 2016 15:25:15 +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 D294B1609B1 for ; Fri, 20 May 2016 17:25:14 +0200 (CEST) Received: (qmail 54329 invoked by uid 500); 20 May 2016 15:25:13 -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 54311 invoked by uid 99); 20 May 2016 15:25:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2016 15:25:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7DECF2C1F58 for ; Fri, 20 May 2016 15:25:13 +0000 (UTC) Date: Fri, 20 May 2016 15:25:13 +0000 (UTC) From: "Jesus Camacho Rodriguez (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-13806) Extension to folding NOT expressions in CBO MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 20 May 2016 15:25:15 -0000 Jesus Camacho Rodriguez created HIVE-13806: ---------------------------------------------- Summary: Extension to folding NOT expressions in CBO Key: HIVE-13806 URL: https://issues.apache.org/jira/browse/HIVE-13806 Project: Hive Issue Type: Sub-task Components: CBO Affects Versions: 2.1.0 Reporter: Jesus Camacho Rodriguez Assignee: Jesus Camacho Rodriguez Follow-up of HIVE-13068. Extension to folding expressions for NOT. Currently, simplification is performed only if NOT is applied on a simple operation (e.g. IS NOT NULL, =, <>, etc.). We should take advantage of NOT distributivity when it is applied on OR/AND operations to try to simplify predicates further. Ex. ql/src/test/results/clientpositive/folder_predicate.q.out {noformat} explain SELECT * FROM predicate_fold_tb WHERE not(value IS NOT NULL AND value = 3) {noformat} Plan: {noformat} STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: predicate_fold_tb Statistics: Num rows: 6 Data size: 7 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (not (value is not null and (value = 3))) (type: boolean) Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: int) outputColumnNames: _col0 Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)