Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20933#discussion_r179673839
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnarBatchReader.java
---
@@ -233,7 +234,7 @@ private boolean nextBatch() throws IOException {
if (!copyToSpark) {
for (int i = 0; i < requiredFields.length; i++) {
- if (requestedColIds[i] != -1) {
+ if (requestedColIds[i] != -1 && requestedPartitionColIds[i] == -1)
{
--- End diff --
we should also apply this check in the `copyToSpark` branch
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]