cloud-fan commented on code in PR #48172:
URL: https://github.com/apache/spark/pull/48172#discussion_r1768266833
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala:
##########
@@ -628,18 +640,39 @@ case class FileSourceScanExec(
}
}
+ val topLevelVariantMetrics: VariantMetrics = new VariantMetrics()
+ val nestedVariantMetrics: VariantMetrics = new VariantMetrics()
+
lazy val inputRDD: RDD[InternalRow] = {
val options = relation.options +
(FileFormat.OPTION_RETURNING_BATCH -> supportsColumnar.toString)
- val readFile: (PartitionedFile) => Iterator[InternalRow] =
- relation.fileFormat.buildReaderWithPartitionValues(
- sparkSession = relation.sparkSession,
- dataSchema = relation.dataSchema,
- partitionSchema = relation.partitionSchema,
- requiredSchema = requiredSchema,
- filters = pushedDownFilters,
- options = options,
- hadoopConf =
relation.sparkSession.sessionState.newHadoopConfWithOptions(relation.options))
+ val readFile: (PartitionedFile) => Iterator[InternalRow] = {
+ val hadoopConf =
relation.sparkSession.sessionState.newHadoopConfWithOptions(relation.options)
+ relation.fileFormat match {
+ case f: JsonFileFormat =>
Review Comment:
We should probably make it more general and allow `FileFormat`
implementations to report additional metrics.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]