alexeykudinkin commented on a change in pull request #4709:
URL: https://github.com/apache/hudi/pull/4709#discussion_r803294484
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBootstrapRelation.scala
##########
@@ -107,37 +107,35 @@ class HoodieBootstrapRelation(@transient val _sqlContext:
SQLContext,
})
// Prepare readers for reading data file and skeleton files
- val dataReadFunction = new ParquetFileFormat()
- .buildReaderWithPartitionValues(
- sparkSession = _sqlContext.sparkSession,
- dataSchema = dataSchema,
- partitionSchema = StructType(Seq.empty),
- requiredSchema = requiredDataSchema,
- filters = if (requiredSkeletonSchema.isEmpty) filters else Seq() ,
- options = Map.empty,
- hadoopConf = _sqlContext.sparkSession.sessionState.newHadoopConf()
- )
-
- val skeletonReadFunction = new ParquetFileFormat()
- .buildReaderWithPartitionValues(
- sparkSession = _sqlContext.sparkSession,
- dataSchema = skeletonSchema,
- partitionSchema = StructType(Seq.empty),
- requiredSchema = requiredSkeletonSchema,
- filters = if (requiredDataSchema.isEmpty) filters else Seq(),
- options = Map.empty,
- hadoopConf = _sqlContext.sparkSession.sessionState.newHadoopConf()
- )
-
- val regularReadFunction = new ParquetFileFormat()
- .buildReaderWithPartitionValues(
- sparkSession = _sqlContext.sparkSession,
- dataSchema = fullSchema,
- partitionSchema = StructType(Seq.empty),
- requiredSchema = requiredColsSchema,
- filters = filters,
- options = Map.empty,
- hadoopConf = _sqlContext.sparkSession.sessionState.newHadoopConf())
+ val dataReadFunction = HoodieDataSourceHelper.buildHoodieParquetReader(
+ sparkSession = _sqlContext.sparkSession,
+ dataSchema = dataSchema,
+ partitionSchema = StructType(Seq.empty),
+ requiredSchema = requiredDataSchema,
+ filters = if (requiredSkeletonSchema.isEmpty) filters else Seq() ,
+ options = Map.empty,
Review comment:
See no reasons why it should not
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]