You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tristan Reid (JIRA)" <ji...@apache.org> on 2016/01/05 12:53:39 UTC

[jira] [Commented] (SPARK-12095) Window function rowsBetween throws exception

    [ https://issues.apache.org/jira/browse/SPARK-12095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082921#comment-15082921 ] 

Tristan Reid commented on SPARK-12095:
--------------------------------------

The SQL syntax doesn't appear to work at all. 
  `select rank() OVER (PARTITION BY c1 ORDER BY c2 ) as rank from tbl`

Is that the case?

> Window function rowsBetween throws exception
> --------------------------------------------
>
>                 Key: SPARK-12095
>                 URL: https://issues.apache.org/jira/browse/SPARK-12095
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.1
>            Reporter: Irakli Machabeli
>
> From pyspark :
>  windowSpec=Window.partitionBy('A', 'B').orderBy('A','B', 'C').rowsBetween('UNBOUNDED PRECEDING','CURRENT')
> Py4JError: An error occurred while calling o1107.rowsBetween. Trace:
> py4j.Py4JException: Method rowsBetween([class java.lang.String, class java.lang.Long]) does not exist
> from SQL query parser fails immediately:
> Py4JJavaError: An error occurred while calling o18.sql.
> : java.lang.RuntimeException: [1.20] failure: ``union'' expected but `(' found
> select rank() OVER (PARTITION BY c1 ORDER BY c2 ) as rank from tbl
>                    ^
>         at scala.sys.package$.error(package.scala:27)
>         at org.apache.spark.sql.catalyst.AbstractSparkSQLParser.parse(AbstractSparkSQLParser.scala:36)



--
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