You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by co...@apache.org on 2023/03/31 12:00:17 UTC

[hudi] branch master updated: [HUDI-5999] Fix bootstrap relation for nonpartitioned bootstrap table (#8317)

This is an automated email from the ASF dual-hosted git repository.

codope pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new f7a3c26960e [HUDI-5999] Fix bootstrap relation for nonpartitioned bootstrap table (#8317)
f7a3c26960e is described below

commit f7a3c26960e9dc370820802def4a22b7f2478190
Author: Jon Vexler <jb...@gmail.com>
AuthorDate: Fri Mar 31 08:00:06 2023 -0400

    [HUDI-5999] Fix bootstrap relation for nonpartitioned bootstrap table (#8317)
---
 .../src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala
index 2c08afaa691..ebabe36dabd 100644
--- a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala
+++ b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala
@@ -68,12 +68,13 @@ case class HoodieBootstrapRelation(override val sqlContext: SQLContext,
 
   protected override def collectFileSplits(partitionFilters: Seq[Expression], dataFilters: Seq[Expression]): Seq[FileSplit] = {
     val fileSlices = listLatestFileSlices(globPaths, partitionFilters, dataFilters)
+    val isPartitioned = metaClient.getTableConfig.isTablePartitioned
     fileSlices.map { fileSlice =>
       val baseFile = fileSlice.getBaseFile.get()
 
       if (baseFile.getBootstrapBaseFile.isPresent) {
         val partitionValues =
-          getPartitionColumnsAsInternalRowInternal(baseFile.getFileStatus, extractPartitionValuesFromPartitionPath = true)
+          getPartitionColumnsAsInternalRowInternal(baseFile.getFileStatus, extractPartitionValuesFromPartitionPath = isPartitioned)
         val dataFile = PartitionedFile(partitionValues, baseFile.getBootstrapBaseFile.get().getPath, 0, baseFile.getBootstrapBaseFile.get().getFileLen)
         val skeletonFile = Option(PartitionedFile(InternalRow.empty, baseFile.getPath, 0, baseFile.getFileLen))