[ https://issues.apache.org/jira/browse/SPARK-11637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15000022#comment-15000022 ]
Xiao Li edited comment on SPARK-11637 at 11/11/15 6:53 AM: ----------------------------------------------------------- In 1.5.1, the output of your query is: Exception in thread "main" org.apache.spark.sql.AnalysisException: invalid expression hash( * ); I will try to investigate this issue. was (Author: smilegator): In 1.5.1, the output of your query is: ''' Exception in thread "main" org.apache.spark.sql.AnalysisException: invalid expression hash(*); ''' I will try to investigate this issue. > Alias do not work with udf with * parameter > ------------------------------------------- > > Key: SPARK-11637 > URL: https://issues.apache.org/jira/browse/SPARK-11637 > Project: Spark > Issue Type: Bug > Affects Versions: 1.5.0, 1.5.1, 1.5.2 > Reporter: Pierre Borckmans > > In Spark < 1.5.0, this used to work : > {code:java|title=Spark <1.5.0|borderStyle=solid} > scala> sqlContext.sql("select hash(*) as x from T") > res2: org.apache.spark.sql.DataFrame = [x: int] > {code} > From Spark 1.5.0+, it fails: > {code:java|title=Spark>=1.5.0|borderStyle=solid} > scala> sqlContext.sql("select hash(*) as x from T") > org.apache.spark.sql.AnalysisException: unresolved operator 'Project > ['hash(*) AS x#1]; > at > org.apache.spark.sql.catalyst.analysis.CheckAnalysis$class.failAnalysis(CheckAnalysis.scala:37) > at > org.apache.spark.sql.catalyst.analysis.Analyzer.failAnalysis(Analyzer.scala:44) > at > org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:174) > at > org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:49) > at > org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:103) > ... > {code} > This is not specific to the `hash` udf. It also applies to user defined > functions. > The `*` seems to be the issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org