MaxGekk commented on a change in pull request #23460: [SPARK-26544][SQL] Escape
string to keep alignment with hive
URL: https://github.com/apache/spark/pull/23460#discussion_r260212048
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/HiveResultSuite.scala
##########
@@ -44,4 +45,11 @@ class HiveResultSuite extends SparkFunSuite with
SharedSQLContext {
val tpe = new ExamplePointUDT()
assert(HiveResult.toHiveString((point, tpe)) === "(50.0, 50.0)")
}
+
+ test("SPARK-26544: toHiveString correctly escape map type") {
+ val m = Map("log_pb" -> """{"impr_id":"20181231"}""", "request_id" ->
"001")
Review comment:
Could you add more test cases to cover at least `\u` and a couple of
`\b`..`\t`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]