cloud-fan commented on a change in pull request #34984:
URL: https://github.com/apache/spark/pull/34984#discussion_r834033725
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/orc/OrcPartitionReaderFactory.scala
##########
@@ -88,17 +88,16 @@ case class OrcPartitionReaderFactory(
}
val filePath = new Path(new URI(file.filePath))
- val resultedColPruneInfo =
- Utils.tryWithResource(createORCReader(filePath, conf)) { reader =>
- OrcUtils.requestedColumnIds(
- isCaseSensitive, dataSchema, readDataSchema, reader, conf)
- }
+ val orcSchema = Utils.tryWithResource(createORCReader(filePath,
conf))(_.getSchema)
+ val resultedColPruneInfo = OrcUtils.requestedColumnIds(
+ isCaseSensitive, dataSchema, readDataSchema, orcSchema, conf)
if (resultedColPruneInfo.isEmpty) {
new EmptyPartitionReader[InternalRow]
} else {
val (requestedColIds, canPruneCols) = resultedColPruneInfo.get
- OrcUtils.orcResultSchemaString(canPruneCols, dataSchema, resultSchema,
partitionSchema, conf)
+ OrcUtils.orcResultSchemaString(canPruneCols,
+ dataSchema, resultSchema, partitionSchema, conf)
Review comment:
```suggestion
OrcUtils.orcResultSchemaString(canPruneCols, dataSchema, resultSchema,
partitionSchema, conf)
```
--
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]