You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/12/16 15:43:00 UTC

[jira] [Commented] (SPARK-33794) [ANSI mode][SQL] next_day function should throw runtime exception when receiving invalid input under ANSI mode

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

Apache Spark commented on SPARK-33794:
--------------------------------------

User 'chongguang' has created a pull request for this issue:
https://github.com/apache/spark/pull/30807

> [ANSI mode][SQL] next_day function should throw runtime exception when receiving invalid input under ANSI mode
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-33794
>                 URL: https://issues.apache.org/jira/browse/SPARK-33794
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Chongguang LIU
>            Priority: Major
>
> Hello all,
> According to [ANSI compliance|https://spark.apache.org/docs/3.0.0/sql-ref-ansi-compliance.html#ansi-compliance], the [next_day function|https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L3095] should throw an runtime exception when receiving invalid value for dayOfWeek, exemple receiving "xx" instead of "SUNDAY".
>  
> A similar improvement has been done on the element_at function: https://issues.apache.org/jira/browse/SPARK-33386
>  
> If you agree with this proposition, i can submit a pull request with necessary change.
>  
> Kind regardes,
>  



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