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: [email protected]
For additional commands, e-mail: [email protected]