You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/06/02 06:51:48 UTC
[GitHub] [spark] beliefer commented on a diff in pull request #41431: [MINOR][TESTS] Fix bug for SQLQueryTestSuite when run on local env
beliefer commented on code in PR #41431:
URL: https://github.com/apache/spark/pull/41431#discussion_r1213991713
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala:
##########
@@ -838,13 +837,17 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession with SQLHelper
s"Schema did not match for query #$i\n${expected.sql}: $output") {
output.schema
}
- assertResult(expected.output, s"Result did not match" +
+ assertResult(normalizeOwner(expected.output), s"Result did not match" +
s" for query #$i\n${expected.sql}") {
output.output
}
}
}
+ private def normalizeOwner(plan: String): String = {
+ plan.replaceAll("""Owner\t\{runner}""", "Owner\t" + Utils.getCurrentUserName)
+ }
Review Comment:
I know this work is OK. But it introduce the extra complexity and readability.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org