You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "brkyvz (via GitHub)" <gi...@apache.org> on 2025/01/07 21:02:12 UTC

Re: [PR] [SPARK-50618][SS][SQL] Make DataFrameReader and DataStreamReader leverage the analyzer more [spark]

brkyvz commented on code in PR #49238:
URL: https://github.com/apache/spark/pull/49238#discussion_r1906035676


##########
sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala:
##########
@@ -606,10 +610,13 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
   }
 
   test("load API") {
-    spark.read.format("org.apache.spark.sql.test").load()
-    spark.read.format("org.apache.spark.sql.test").load(dir)
-    spark.read.format("org.apache.spark.sql.test").load(dir, dir, dir)
-    spark.read.format("org.apache.spark.sql.test").load(Seq(dir, dir): _*)
+    def assertFirstUnresolved(df: DataFrame): Unit = {
+      assert(!df.queryExecution.logical.resolved)
+    }
+    assertFirstUnresolved(spark.read.format("org.apache.spark.sql.test").load())
+    assertFirstUnresolved(spark.read.format("org.apache.spark.sql.test").load(dir))
+    assertFirstUnresolved(spark.read.format("org.apache.spark.sql.test").load(dir, dir, dir))
+    assertFirstUnresolved(spark.read.format("org.apache.spark.sql.test").load(Seq(dir, dir): _*))
     Option(dir).map(spark.read.format("org.apache.spark.sql.test").load)

Review Comment:
   oh just the monadic API I guess (use of map)



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