You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:15:09 UTC
[jira] [Resolved] (SPARK-22420) Spark SQL return invalid json
string for struct with date/datetime field
[ https://issues.apache.org/jira/browse/SPARK-22420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-22420.
----------------------------------
Resolution: Incomplete
> Spark SQL return invalid json string for struct with date/datetime field
> ------------------------------------------------------------------------
>
> Key: SPARK-22420
> URL: https://issues.apache.org/jira/browse/SPARK-22420
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.1.1
> Reporter: pin_zhang
> Priority: Major
> Labels: bulk-closed
>
> Run SQL with JDBC client in spark hiveserver2
> select named_struct ( 'b',current_timestamp) from test;
> +---------------------------------------+--+
> | named_struct(b, current_timestamp()) |
> +---------------------------------------+--+
> | {"b":2017-11-01 23:18:40.988} |
> The json string is is invalid, date time value should be quoted.
> If run sql in Apache hiveserver2, get expected json string
> select named_struct ( 'b',current_timestamp) from dummy_table ;
> +----------------------------------+--+
> | _c0 |
> +----------------------------------+--+
> | {"b":"2017-11-01 23:21:24.168"} |
> +----------------------------------+--+
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org