Skip to content

Commit 10ce9e5

Browse files
author
Alexey Kudinkin
committed
Reverting changes
1 parent a500ed8 commit 10ce9e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,7 @@ abstract class HoodieBaseRelation(val sqlContext: SQLContext,
399399
protected def getPartitionColumnsAsInternalRow(file: FileStatus): InternalRow = {
400400
try {
401401
val tableConfig = metaClient.getTableConfig
402-
if (partitionColumns.isEmpty) {
403-
InternalRow.empty
404-
} else {
402+
if (shouldExtractPartitionValuesFromPartitionPath) {
405403
val relativePath = new URI(metaClient.getBasePath).relativize(new URI(file.getPath.getParent.toString)).toString
406404
val hiveStylePartitioningEnabled = tableConfig.getHiveStylePartitioningEnable.toBoolean
407405
if (hiveStylePartitioningEnabled) {
@@ -416,6 +414,8 @@ abstract class HoodieBaseRelation(val sqlContext: SQLContext,
416414
InternalRow.fromSeq(parts.map(UTF8String.fromString))
417415
}
418416
}
417+
} else {
418+
InternalRow.empty
419419
}
420420
} catch {
421421
case NonFatal(e) =>

0 commit comments

Comments
 (0)