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



##########
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:
       Used simple names now. It is somewhat relevant that the table is 
non-partitioned. For partitioned tables, the location of each partition is used 
and so these table level properties are ignored.

##########
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:
       Fixed! Copied it from a test above, didn't pay too much attention.




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