Return-Path: X-Original-To: apmail-spark-reviews-archive@minotaur.apache.org Delivered-To: apmail-spark-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A39FE115A3 for ; Mon, 28 Apr 2014 06:38:15 +0000 (UTC) Received: (qmail 29533 invoked by uid 500); 28 Apr 2014 06:38:15 -0000 Delivered-To: apmail-spark-reviews-archive@spark.apache.org Received: (qmail 29524 invoked by uid 500); 28 Apr 2014 06:38:15 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@spark.apache.org Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 29516 invoked by uid 99); 28 Apr 2014 06:38:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Apr 2014 06:38:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9C52C993C0D; Mon, 28 Apr 2014 06:38:14 +0000 (UTC) From: marmbrus To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request: [WIP][Spark-SQL] Optimize the Constant Folding... Content-Type: text/plain Message-Id: <20140428063814.9C52C993C0D@tyr.zones.apache.org> Date: Mon, 28 Apr 2014 06:38:14 +0000 (UTC) Github user marmbrus commented on a diff in the pull request: https://github.com/apache/spark/pull/482#discussion_r12036270 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala --- @@ -91,10 +91,53 @@ object ColumnPruning extends Rule[LogicalPlan] { */ object ConstantFolding extends Rule[LogicalPlan] { def apply(plan: LogicalPlan): LogicalPlan = plan transform { - case q: LogicalPlan => q transformExpressionsDown { + case q: LogicalPlan => q transformExpressionsUp { --- End diff -- Do we want `Up`? I believe this means we are going to call evaluate on each foldable node working up instead of just calling it once at the top. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---