spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-26544) escape string when serialize map/array to make it a valid json (keep alignment with hive)
Date Sat, 05 Jan 2019 08:22:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-26544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734807#comment-16734807
] 

Apache Spark commented on SPARK-26544:
--------------------------------------

User 'WangGuangxin' has created a pull request for this issue:
https://github.com/apache/spark/pull/23460

> escape string when serialize map/array to make it a valid json (keep alignment with hive)
> -----------------------------------------------------------------------------------------
>
>                 Key: SPARK-26544
>                 URL: https://issues.apache.org/jira/browse/SPARK-26544
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: EdisonWang
>            Priority: Major
>
> when reading a hive table with map/array type, the string serialized by thrift server
is not a valid json, while hive is. 
> For example, select a field whose type is map<string, string>, the spark thrift
server returns 
>  
> {code:java}
> {"author_id":"123","log_pb":"{"impr_id":"20181231"}","request_id":"001"}
> {code}
>  
> while hive thriftserver returns
>  
> {code:java}
> {"author_id":"123", "log_pb":"{\"impr_id\":\"20181231\"}","request_id":"001"}
> {code}
>  



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


Mime
View raw message