gengliangwang commented on code in PR #50571:
URL: https://github.com/apache/spark/pull/50571#discussion_r2040358977


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala:
##########
@@ -1405,6 +1405,31 @@ abstract class DDLSuite extends QueryTest with 
DDLSuiteBase {
     }
   }
 
+  test("SPARK-51747: When legacy conf enabled data source read ignores option 
change") {
+    withSQLConf(SQLConf.READ_DATA_SOURCE_CACHE_IGNORE_OPTIONS.key -> "true") {
+      withTable("t") {
+        spark.sql("CREATE TABLE t(a string, b string) USING CSV".stripMargin)
+        spark.sql("INSERT INTO TABLE t VALUES ('a;b', 'c')")
+        spark.sql("INSERT INTO TABLE t VALUES ('hello; world', 'test')")
+
+        // check initial contents of table
+        checkAnswer(spark.table("t"), Row("a;b", "c") :: Row("hello; world", 
"test") :: Nil)

Review Comment:
   It would be great to check the cached plan after this first read as well. We 
should ensure plan are cached



-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to