You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/30 17:59:08 UTC

[GitHub] [spark] dtenedor commented on a diff in pull request #38052: [SPARK-40618][SQL] Fix bug in MergeScalarSubqueries rule with nested subqueries

dtenedor commented on code in PR #38052:
URL: https://github.com/apache/spark/pull/38052#discussion_r984829104


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/MergeScalarSubqueriesSuite.scala:
##########
@@ -560,19 +550,20 @@ class MergeScalarSubqueriesSuite extends PlanTest {
           Literal("a_plus2"), 'a_plus2,
           Literal("b"), 'b
         )).as("mergedValue"))
-    val analyzedMergedSubquery = mergedSubquery.analyze
-    val correctAnswer = WithCTE(
-      testRelation
-        .select(
-          extractorExpression(0, analyzedMergedSubquery.output, 0),
-          extractorExpression(0, analyzedMergedSubquery.output, 1),
-          extractorExpression(0, analyzedMergedSubquery.output, 2))
-        .where(
-          extractorExpression(0, analyzedMergedSubquery.output, 0) +
-          extractorExpression(0, analyzedMergedSubquery.output, 1) +
-          extractorExpression(0, analyzedMergedSubquery.output, 2) === 0),
-      Seq(definitionNode(analyzedMergedSubquery, 0)))
-
-    comparePlans(Optimize.execute(originalQuery.analyze), correctAnswer.analyze)
+    val correctAnswer =

Review Comment:
   This unit test is reverted now.



-- 
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