You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chetan Bhat (Jira)" <ji...@apache.org> on 2021/01/20 10:56:00 UTC

[jira] [Updated] (SPARK-34179) examples provided in https://spark.apache.org/docs/latest/api/sql/index.html link not working

     [ https://issues.apache.org/jira/browse/SPARK-34179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chetan Bhat updated SPARK-34179:
--------------------------------
    Summary: examples provided in https://spark.apache.org/docs/latest/api/sql/index.html   link not working  (was: array_sort examples provided in https://spark.apache.org/docs/latest/api/sql/index.html#array_sort   link not working)

> examples provided in https://spark.apache.org/docs/latest/api/sql/index.html   link not working
> -----------------------------------------------------------------------------------------------
>
>                 Key: SPARK-34179
>                 URL: https://issues.apache.org/jira/browse/SPARK-34179
>             Project: Spark
>          Issue Type: Bug
>          Components: docs
>    Affects Versions: 2.4.5
>         Environment: Spark 2.4.5
>            Reporter: Chetan Bhat
>            Priority: Minor
>
> *array_sort examples provided in https://spark.apache.org/docs/latest/api/sql/index.html#array_sort link not working.*
>  
> SELECT array_sort(array(5, 6, 1), (left, right) -> case when left < right then -1 when left > right then 1 else 0 end); –> *this example when executed in spark-sql fails with below error*
> SELECT array_sort(array(5, 6, 1), (left, right) -> case when left < right then -1 when left > right then 1 else 0 end);
> Error in query:
> extraneous input '->' expecting \{')', ','}(line 1, pos 48)
> == SQL ==
> SELECT array_sort(array(5, 6, 1), (left, right) -> case when left < right then -1 when left > right then 1 else 0 end)
> ------------------------------------------------^^^
> spark-sql>
>  
> SELECT array_sort(array('bc', 'ab', 'dc'), (left, right) -> case when left is null and right is null then 0 when left is null then -1 when right is null then 1 when left < right then 1 when left > right then -1 else 0 end);  --> *This example when executed fails with below error*
>  
> spark-sql>
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > SELECT array_sort(array('bc', 'ab', 'dc'), (left, right) -> case when left is null and right is null then 0 when left is null then -1 when right is null then 1 when left < right then 1 when left > right then -1 else 0 end);
> Error in query:
> extraneous input '->' expecting \{')', ','}(line 1, pos 57)
> == SQL ==
> SELECT array_sort(array('bc', 'ab', 'dc'), (left, right) -> case when left is null and right is null then 0 when left is null then -1 when right is null then 1 when left < right then 1 when left > right then -1 else 0 end)
> ---------------------------------------------------------^^^
> spark-sql>
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org