xkrogen commented on a change in pull request #33328:
URL: https://github.com/apache/spark/pull/33328#discussion_r669022583



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
##########
@@ -363,4 +363,33 @@ class DataSourceWithHiveMetastoreCatalogSuite
       }
     })
   }
+
+  Seq(
+    "parquet" -> "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
+    "orc" -> "org.apache.hadoop.hive.ql.io.orc.OrcSerde"
+  ).foreach { case (format, serde) =>
+    test("SPARK-28266: convertToLogicalRelation should not interpret `path` 
property when " +
+      s"reading Hive tables using $format file format") {
+      withTempPath(dir => {
+        val baseDir = s"${dir.getCanonicalFile.toURI.toString}"
+        spark.range(3).selectExpr("id").write.format(format).save(baseDir)
+        withTable("non_partition_table") {

Review comment:
       Can we give the table a more simple name like `foo` or `t`? Or is it 
relevant that it's not partitioned?

##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
##########
@@ -363,4 +363,33 @@ class DataSourceWithHiveMetastoreCatalogSuite
       }
     })
   }
+
+  Seq(
+    "parquet" -> "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
+    "orc" -> "org.apache.hadoop.hive.ql.io.orc.OrcSerde"
+  ).foreach { case (format, serde) =>
+    test("SPARK-28266: convertToLogicalRelation should not interpret `path` 
property when " +
+      s"reading Hive tables using $format file format") {
+      withTempPath(dir => {
+        val baseDir = s"${dir.getCanonicalFile.toURI.toString}"

Review comment:
       Seems that the string interpolation is unnecessary here?
   
   Also can we just use `dir.getAbsolutePath`? Or do we require a URI here?




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