cloud-fan commented on a change in pull request #27478: [SPARK-25829][SQL] Add
config `spark.sql.legacy.allowDuplicatedMapKeys` and change the default behavior
URL: https://github.com/apache/spark/pull/27478#discussion_r380008658
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -188,11 +188,13 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
checkExampleSyntax(example)
example.split(" > ").toList.foreach(_ match {
case exampleRe(sql, output) =>
- val df = clonedSpark.sql(sql)
- val actual = unindentAndTrim(
-
hiveResultString(df.queryExecution.executedPlan).mkString("\n"))
- val expected = unindentAndTrim(output)
- assert(actual === expected)
+ withSQLConf(SQLConf.LEGACY_ALLOW_DUPLICATED_MAP_KEY.key ->
"true") {
Review comment:
can you check the map-related builtin expressions? seems they use wrong
examples that have duplicated keys.
----------------------------------------------------------------
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]