cloud-fan commented on a change in pull request #34984:
URL: https://github.com/apache/spark/pull/34984#discussion_r778664524



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcUtils.scala
##########
@@ -372,12 +386,14 @@ object OrcUtils extends Logging {
       canPruneCols: Boolean,
       dataSchema: StructType,
       resultSchema: StructType,
+      orcCatalystSchema: StructType,
       partitionSchema: StructType,
       conf: Configuration): String = {
     val resultSchemaString = if (canPruneCols) {
-      OrcUtils.orcTypeDescriptionString(resultSchema)
+      OrcUtils.orcTypeDescriptionString(resultSchema, Some(orcCatalystSchema))

Review comment:
       It's quite hacky to put schema evolution code in a method named 
`orcTypeDescriptionString`. I'd prefer more explicit code similar to 
`ParquetReadSupport.clipParquetSchema`




-- 
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]

Reply via email to