[
https://issues.apache.org/jira/browse/SPARK-22420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon updated SPARK-22420:
---------------------------------
Labels: bulk-closed (was: )
> 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: [email protected]
For additional commands, e-mail: [email protected]