Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 215D117251 for ; Fri, 4 Sep 2015 08:58:46 +0000 (UTC) Received: (qmail 46964 invoked by uid 500); 4 Sep 2015 08:58:46 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 46934 invoked by uid 500); 4 Sep 2015 08:58:46 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 46920 invoked by uid 99); 4 Sep 2015 08:58:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 08:58:45 +0000 Date: Fri, 4 Sep 2015 08:58:45 +0000 (UTC) From: "Apache Spark (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (SPARK-10437) Support aggregation expressions in Order By 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/SPARK-10437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-10437: ------------------------------------ Assignee: (was: Apache Spark) > Support aggregation expressions in Order By > ------------------------------------------- > > Key: SPARK-10437 > URL: https://issues.apache.org/jira/browse/SPARK-10437 > Project: Spark > Issue Type: Bug > Components: SQL > Reporter: Harish Butani > > Followup on SPARK-6583 > The following still fails. > {code} > val df = sqlContext.read.json("examples/src/main/resources/people.json") > df.registerTempTable("t") > val df2 = sqlContext.sql("select age, count(*) from t group by age order by count(*)") > df2.show() > {code} > {code:title=StackTrace} > Caused by: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: No function to evaluate expression. type: Count, tree: COUNT(1) > at org.apache.spark.sql.catalyst.expressions.AggregateExpression.eval(aggregates.scala:41) > at org.apache.spark.sql.catalyst.expressions.RowOrdering.compare(rows.scala:219) > {code} > In 1.4 the issue seemed to be BindReferences.bindReference didn't handle this case. > Haven't looked at 1.5 code, but don't see a change to bindReference in this patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org