You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "jiaan.geng (Jira)" <ji...@apache.org> on 2021/08/05 11:17:00 UTC

[jira] [Created] (SPARK-36429) JacksonParser should throw exception when data type unsupported.

jiaan.geng created SPARK-36429:
----------------------------------

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


Currently, when set spark.sql.timestampType=TIMESTAMP_NTZ, the behavior is different between from_json and from_csv.
-- !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}


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

We should make from_json throws exception too.



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