dongjoon-hyun commented on code in PR #51534:
URL: https://github.com/apache/spark/pull/51534#discussion_r2213490071
##########
sql/core/src/test/scala/org/apache/spark/sql/PlanStabilitySuite.scala:
##########
@@ -231,18 +231,15 @@ trait PlanStabilitySuite extends
DisableAdaptiveExecutionSuite {
}
private def normalizeIds(plan: String): String = {
- val map = new mutable.HashMap[String, String]()
- normalizeRegex.findAllMatchIn(plan).map(_.toString)
- .foreach(map.getOrElseUpdate(_, (map.size + 1).toString))
- val exprIdNormalized = normalizeRegex.replaceAllIn(
- plan, regexMatch => s"#${map(regexMatch.toString)}")
+ val exprIdMap = new mutable.HashMap[String, String]()
+ val exprIdNormalized = exprIdRegexp.replaceAllIn(plan,
+ m => exprIdMap.getOrElseUpdate(m.toString(),
s"${m.group("prefix")}${exprIdMap.size + 1}"))
- // Normalize the plan id in Exchange nodes. See `Exchange.stringArgs`.
+ // Normalize the plan ids in Exchange and Subquery nodes.
Review Comment:
Thank you for supporting Subquery correctly.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]