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

Apache Spark commented on SPARK-36429:
--------------------------------------

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

> JacksonParser should throw exception when data type unsupported.
> ----------------------------------------------------------------
>
>                 Key: SPARK-36429
>                 URL: https://issues.apache.org/jira/browse/SPARK-36429
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: jiaan.geng
>            Assignee: jiaan.geng
>            Priority: Major
>             Fix For: 3.2.0
>
>
> Currently, when set spark.sql.timestampType=TIMESTAMP_NTZ, the behavior is 
> different between from_json and from_csv.
> {code:java}
> -- !query
> select from_json('{"t":"26/October/2015"}', 't Timestamp', 
> map('timestampFormat', 'dd/MMMMM/yyyy'))
> -- !query schema
> struct<from_json({"t":"26/October/2015"}):struct<t:timestamp_ntz>>
> -- !query output
> {"t":null}
> {code}
> {code:java}
> -- !query
> select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', 
> 'dd/MMMMM/yyyy'))
> -- !query schema
> struct<>
> -- !query output
> java.lang.Exception
> Unsupported type: timestamp_ntz
> {code}
> We should make from_json throws exception too.



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

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

Reply via email to