hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] garyli1019 commented on a change in pull request #1348: HUDI-597 Enable incremental pulling from defined partitions
Date Mon, 24 Feb 2020 00:37:12 GMT
garyli1019 commented on a change in pull request #1348: HUDI-597 Enable incremental pulling
from defined partitions
URL: https://github.com/apache/incubator-hudi/pull/1348#discussion_r383055959
 
 

 ##########
 File path: hudi-spark/src/test/scala/TestDataSource.scala
 ##########
 @@ -135,6 +136,14 @@ class TestDataSource extends AssertionsForJUnit {
     countsPerCommit = hoodieIncViewDF2.groupBy("_hoodie_commit_time").count().collect();
     assertEquals(1, countsPerCommit.length)
     assertEquals(commitInstantTime2, countsPerCommit(0).get(0))
+
+    // pull the latest commit within certain partitions
+    val hoodieIncViewDF3 = spark.read.format("org.apache.hudi")
+      .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
+      .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, commitInstantTime1)
+      .option(DataSourceReadOptions.INCR_PATH_GLOB_OPT_KEY, "/2016/*/*/*")
 
 Review comment:
   Since we add `*` in front of it so it will still work without `/`. Here is just trying
to be consistent with loading the full table. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message