cloud-fan commented on code in PR #47370:
URL: https://github.com/apache/spark/pull/47370#discussion_r1681160112


##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -4856,6 +4856,28 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
         |"""
     )
   }
+
+  test("SPARK-36680: Files hint options should be put into resolveDataSource 
function") {
+    val df1 = spark.range(100).toDF()
+    withTempPath(f => {
+      df1.write.json(f.getCanonicalPath)
+      val df2 = sql(
+        s"""
+           |SELECT id
+           |FROM json.`${f.getCanonicalPath}`
+           |WITH (`key1` = 1, `key2` = 2)
+        """.stripMargin
+      )
+      checkAnswer(df2, df1)
+      df2.queryExecution.analyzed foreach {

Review Comment:
   to make the test more explicit, I suggest to do
   ```
   val relations = df2.queryExecution.analyzed.collect {
     case LogicalRelation(fs: HadoopFsRelation, _, _, _) => fs
   }
   assert(relations.length == 1)
   assert(relations.head.options == ...)
   ```



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