uros-b commented on code in PR #57308:
URL: https://github.com/apache/spark/pull/57308#discussion_r3614219694


##########
sql/connect/client/jvm/src/test/scala/org/apache/spark/sql/DataFrameSubquerySuite.scala:
##########
@@ -337,6 +337,15 @@ class DataFrameSubquerySuite extends QueryTest with 
RemoteSparkSession {
         .table("l")
         .where($"l.a".isin(spark.table("r").select("c")) && $"l.a" > 2 && 
$"l.b".isNotNull),
       sql("select * from l where l.a in (select c from r) and l.a > 2 and l.b 
is not null"))
+
+    // SPARK-58165: a scalar subquery nested inside the IN subquery's values. 
The nested
+    // SubqueryExpression must still contribute its plan to WithRelations; 
otherwise the server
+    // fails with "Missing relation in WithRelations". Regression guard for 
the Connect path.
+    checkAnswer(

Review Comment:
   Nit (non-blocking, optional): this new case is appended to the existing 
test("IN predicate subquery") block. Consider pulling it into a dedicated 
test("SPARK-58165: scalar subquery nested in IN subquery values") in both 
suites (connect and classic).
   
   The bug has a specific, named regression signature (Missing relation in 
WithRelations), and a self-contained test gives a sharper failure signal and 
can't be masked by an earlier checkAnswer failing in the same block. The inline 
// SPARK-58165 comment already documents intent well; this just isolates it 
better.



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

Reply via email to