HyukjinKwon commented on a change in pull request #26965:
[SPARK-30330][SQL]Support single quotes json parsing for get_json_object and
json_tuple
URL: https://github.com/apache/spark/pull/26965#discussion_r410190248
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
##########
@@ -101,8 +101,9 @@ private[this] object JsonPathParser extends RegexParsers {
private[this] object SharedFactory {
val jsonFactory = new JsonFactoryBuilder()
- // Enabled for Hive compatibility
+ // The two options below enabled for Hive compatibility
.enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS)
+ .enable(JsonReadFeature.ALLOW_SINGLE_QUOTES)
Review comment:
But the main reason why these were added is for Hive compatibility IIRC.
It's a minimised change to keep the compatibility. Also, I guess these are all
instances for Spark JSON functions corresponding to Hive?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]