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 35649109AA for ; Fri, 15 Nov 2013 22:01:24 +0000 (UTC) Received: (qmail 21029 invoked by uid 500); 15 Nov 2013 22:01:23 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 20984 invoked by uid 500); 15 Nov 2013 22:01:23 -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 20975 invoked by uid 500); 15 Nov 2013 22:01:23 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 20972 invoked by uid 99); 15 Nov 2013 22:01:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 22:01:23 +0000 Date: Fri, 15 Nov 2013 22:01:23 +0000 (UTC) From: "Eric Hanson (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5771) Constant propagation optimizer for Hive 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-5771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824147#comment-13824147 ] Eric Hanson commented on HIVE-5771: ----------------------------------- Right now, a query like this: select ... from T where a = 2 * 2; will not vectorize. This is because the "=(column,scalar)" operator looks in the syntax tree to find variable expression result or column on the left and a single scalar on the right. If the constant folder can turn 2 * 2 into the integer literal 4, then the vectorization code can process the "a = 4" filter. Being able to fold CAST(constant-expression AS type) will also help, because people use this, especially for casting a string literal to a timestamp. > Constant propagation optimizer for Hive > --------------------------------------- > > Key: HIVE-5771 > URL: https://issues.apache.org/jira/browse/HIVE-5771 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Ted Xu > Assignee: Ted Xu > Attachments: HIVE-5771.patch > > > Currently there is no constant folding/propagation optimizer, all expressions are evaluated at runtime. > HIVE-2470 did a great job on evaluating constants on UDF initializing phase, however, it is still a runtime evaluation and it doesn't propagate constants from a subquery to outside. > It may reduce I/O and accelerate process if we introduce such an optimizer. -- This message was sent by Atlassian JIRA (v6.1#6144)