LuciferYang commented on code in PR #57308:
URL: https://github.com/apache/spark/pull/57308#discussion_r3615283128


##########
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:
   fixed by 07abe23



##########
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(
+      spark
+        .table("l")
+        
.where(spark.table("r").select(max($"c")).scalar().isin(spark.table("r").select($"c"))),

Review Comment:
   fixed by 07abe23



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