cloud-fan commented on code in PR #47723:
URL: https://github.com/apache/spark/pull/47723#discussion_r1716467218
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -3627,6 +3629,40 @@ class DataSourceV2SQLSuiteV1Filter
}
}
+ def checkParquet(tableName: String, path: String): Unit = {
+ withTable(tableName) {
+ sql("CREATE TABLE " + tableName +
+ " (name STRING) USING PARQUET LOCATION '" + path + "'")
+ sql("INSERT INTO " + tableName + " VALUES('Bob')")
+ val df = sql("SELECT * FROM " + tableName)
+ assert(df.queryExecution.analyzed.exists {
+ case _@LogicalRelation(_: HadoopFsRelation, _, _, _) => true
Review Comment:
```suggestion
case LogicalRelation(_: HadoopFsRelation, _, _, _) => true
```
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -3627,6 +3629,40 @@ class DataSourceV2SQLSuiteV1Filter
}
}
+ def checkParquet(tableName: String, path: String): Unit = {
+ withTable(tableName) {
+ sql("CREATE TABLE " + tableName +
+ " (name STRING) USING PARQUET LOCATION '" + path + "'")
+ sql("INSERT INTO " + tableName + " VALUES('Bob')")
+ val df = sql("SELECT * FROM " + tableName)
+ assert(df.queryExecution.analyzed.exists {
+ case _@LogicalRelation(_: HadoopFsRelation, _, _, _) => true
+ case _ => false
+ })
+ val result = df.collectAsList()
Review Comment:
let's use `checkAnswer`
--
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]