HyukjinKwon commented on a change in pull request #29535:
URL: https://github.com/apache/spark/pull/29535#discussion_r714469347
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2DataFrameSuite.scala
##########
@@ -186,4 +187,21 @@ class DataSourceV2DataFrameSuite
assert(e3.getMessage.contains(s"Cannot use interval type in the table
schema."))
}
}
+
+ test("options to scan v2 table should be passed to DataSourceV2Relation") {
+ val t1 = "testcat.ns1.ns2.tbl"
+ withTable(t1) {
+ val df1 = Seq((1L, "a"), (2L, "b"), (3L, "c")).toDF("id", "data")
+ df1.write.saveAsTable(t1)
+
+ val optionName = "fakeOption"
+ val df2 = spark.read
+ .option(optionName, false)
+ .table(t1)
Review comment:
so for doubly sure, what happen if some options are already set in this
table? e.g.)
```scala
sql("CREATE TABLE tbl(a int) USING jdbc OPTIONS(a='b')")
spark.option("a", "c").table("tbl")
```
--
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]