Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-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 1894311A7D for ; Mon, 18 Aug 2014 00:00:24 +0000 (UTC) Received: (qmail 52004 invoked by uid 500); 18 Aug 2014 00:00:23 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 51927 invoked by uid 500); 18 Aug 2014 00:00:23 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 51602 invoked by uid 500); 18 Aug 2014 00:00:23 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 51597 invoked by uid 99); 18 Aug 2014 00:00:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 00:00:23 +0000 Date: Mon, 18 Aug 2014 00:00:23 +0000 (UTC) From: "Daniel Dai (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PIG-4128) New logical optimizer rule: ConstantCalculator 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/PIG-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100183#comment-14100183 ] Daniel Dai commented on PIG-4128: --------------------------------- RB link: https://reviews.apache.org/r/24789/ > New logical optimizer rule: ConstantCalculator > ---------------------------------------------- > > Key: PIG-4128 > URL: https://issues.apache.org/jira/browse/PIG-4128 > Project: Pig > Issue Type: New Feature > Components: impl > Reporter: Daniel Dai > Assignee: Daniel Dai > Fix For: 0.14.0 > > Attachments: PIG-4128-1.patch > > > Pig used to have a LogicExpressionSimplifier to simplify expression which also calculates constant expression. The optimizer rule is buggy and we disable it by default in PIG-2316. > However, we do need this feature especially in partition/predicate push down, since both does not deal with complex constant expression, we'd like to replace the expression with constant before the actual push down. Yes, user may manually do the calculation and rewrite the query, but even rewrite is sometimes not possible. Consider the case user want to push a datetime predicate, user have to write a ToDate udf since Pig does not have datetime constant. > In this Jira, I provide a new rule: ConstantCalculator, which is much simpler and much less error prone, to replace LogicExpressionSimplifier. -- This message was sent by Atlassian JIRA (v6.2#6252)