[jira] [Updated] (SPARK-36429) JacksonParser should throw exception when data type unsupported.
[ https://issues.apache.org/jira/browse/SPARK-36429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] jiaan.geng updated SPARK-36429: --- Description: 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/M/')) -- !query schema struct> -- !query output {"t":null} {code} -- !query select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', 'dd/M/')) -- !query schema struct<> -- !query output java.lang.Exception Unsupported type: timestamp_ntz We should make from_json throws exception too. was: 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/M/')) -- !query schema struct> -- !query output {"t":null} -- !query select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', 'dd/M/')) -- !query schema struct<> -- !query output java.lang.Exception Unsupported type: timestamp_ntz We should make from_json throws exception too. > 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 >Priority: Major > > 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/M/')) > -- !query schema > struct> > -- !query output > {"t":null} > {code} > -- !query > select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', > 'dd/M/')) > -- !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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-36429) JacksonParser should throw exception when data type unsupported.
[ https://issues.apache.org/jira/browse/SPARK-36429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] jiaan.geng updated SPARK-36429: --- Description: 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/M/')) -- !query schema struct> -- !query output {"t":null} {code} {code:java} -- !query select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', 'dd/M/')) -- !query schema struct<> -- !query output java.lang.Exception Unsupported type: timestamp_ntz {code} We should make from_json throws exception too. was: 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/M/')) -- !query schema struct> -- !query output {"t":null} {code} -- !query select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', 'dd/M/')) -- !query schema struct<> -- !query output java.lang.Exception Unsupported type: timestamp_ntz We should make from_json throws exception too. > 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 >Priority: Major > > 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/M/')) > -- !query schema > struct> > -- !query output > {"t":null} > {code} > {code:java} > -- !query > select from_csv('26/October/2015', 't Timestamp', map('timestampFormat', > 'dd/M/')) > -- !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