LantaoJin commented on a change in pull request #26525: [SPARK-29899][SQL] 
Recursively load data in Hive table via TBLPROPERTIES
URL: https://github.com/apache/spark/pull/26525#discussion_r347725062
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
 ##########
 @@ -358,4 +358,30 @@ class DataSourceWithHiveMetastoreCatalogSuite
         Seq(table("src").count().toString))
     }
   }
+
+  test("SPARK-29899: Recursively load data in table via TBLPROPERTIES") {
+    withTempPath(dir => {
+      val baseDir = s"${dir.getCanonicalFile.toURI.toString}/path1"
+      val innerDir = s"$baseDir/path2/path3"
+      spark.range(3).selectExpr("id").write.parquet(innerDir)
+      withTable("test1", "test2") {
+        withSQLConf(HiveUtils.CONVERT_METASTORE_PARQUET.key -> "true") {
+          spark.sql(
+            s"""
+               |CREATE TABLE test1 (id bigint)
+               |STORED AS PARQUET LOCATION '$baseDir'
+               |TBLPROPERTIES (
+               | 'recursiveFileLookup'='true')
 
 Review comment:
   Thanks to point me this. Maybe 'spark.recursiveFileLookup' is much more 
meaningful for user.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to