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 6CEDE200CAA for ; Sat, 17 Jun 2017 22:16:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6B9C3160BD2; Sat, 17 Jun 2017 20:16:01 +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 B261B160BC4 for ; Sat, 17 Jun 2017 22:16:00 +0200 (CEST) Received: (qmail 75023 invoked by uid 500); 17 Jun 2017 20:15:59 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 75012 invoked by uid 99); 17 Jun 2017 20:15:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jun 2017 20:15:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 92289E0061; Sat, 17 Jun 2017 20:15:59 +0000 (UTC) From: gatorsmile To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org Message-ID: Subject: [GitHub] spark pull request #18338: [SPARK-21129] [SQL] Arguments of SQL function cal... Content-Type: text/plain Date: Sat, 17 Jun 2017 20:15:59 +0000 (UTC) archived-at: Sat, 17 Jun 2017 20:16:01 -0000 GitHub user gatorsmile opened a pull request: https://github.com/apache/spark/pull/18338 [SPARK-21129] [SQL] Arguments of SQL function call should not be named expressions ### What changes were proposed in this pull request? Function argument should not be named expressions. It could cause misleading error message. ``` spark-sql> select count(distinct c1, distinct c2) from t1; Error in query: cannot resolve '`distinct`' given input columns: [c1, c2]; line 1 pos 26; 'Project [unresolvedalias('count(c1#30, 'distinct), None)] +- SubqueryAlias t1 +- CatalogRelation `default`.`t1`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c1#30, c2#31] ``` After the fix, the error message becomes ``` ``` ### How was this patch tested? Added a test case to parser suite. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gatorsmile/spark parserDistinctAggFunc Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18338.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18338 ---- commit bc8e638be95b5c163385e22a9d78012116b307fa Author: Xiao Li Date: 2017-06-17T20:04:06Z fix. ---- --- 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. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org