You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yin Huai (JIRA)" <ji...@apache.org> on 2015/12/03 01:37:11 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=15036958#comment-15036958 ] 

Yin Huai commented on SPARK-12095:
----------------------------------

In DataFrame API, the syntax is different from SQL's syntax. You can take a look at http://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.Window.

> 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