Skip to content

Commit 695ddd4

Browse files
author
Alexey Kudinkin
committed
Fixed dataSchema to only strip out partition columns in case when partition values are extracted from partition path
1 parent b640fc1 commit 695ddd4

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,11 @@ abstract class HoodieBaseRelation(val sqlContext: SQLContext,
247247
*
248248
* Check scala-doc for [[shouldExtractPartitionValuesFromPartitionPath]] for more details
249249
*/
250-
def dataSchema: StructType =
251-
if (shouldExtractPartitionValuesFromPartitionPath) {
252-
prunePartitionColumns(tableStructSchema)
253-
} else {
254-
tableStructSchema
255-
}
250+
def dataSchema: StructType = if (shouldExtractPartitionValuesFromPartitionPath) {
251+
prunePartitionColumns(tableStructSchema)
252+
} else {
253+
tableStructSchema
254+
}
256255

257256
/**
258257
* Determines whether relation's schema could be pruned by Spark's Optimizer

0 commit comments

Comments
 (0)