dongjoon-hyun commented on a change in pull request #23387: 
[SPARK-26447][SQL]Allow OrcColumnarBatchReader to return less partition columns
URL: https://github.com/apache/spark/pull/23387#discussion_r244081517
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
 ##########
 @@ -186,8 +186,9 @@ class OrcFileFormat
       if (requestedColIdsOrEmptyFile.isEmpty) {
         Iterator.empty
       } else {
-        val requestedColIds = requestedColIdsOrEmptyFile.get
-        assert(requestedColIds.length == requiredSchema.length,
+        val requestedColIds =
+          requestedColIdsOrEmptyFile.get ++ 
Array.fill(partitionSchema.length)(-1)
+        assert(requestedColIds.length == resultSchema.length,
           "[BUG] requested column IDs do not match required schema")
 
 Review comment:
   Could you adjust the error message according to your PR? `required schema` 
is not used in the new assertion.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to