rizaon commented on a change in pull request #990:
URL: https://github.com/apache/orc/pull/990#discussion_r779216881



##########
File path: c++/src/ColumnReader.cc
##########
@@ -1006,9 +1009,12 @@ namespace orc {
     if (stream == nullptr)
       throw ParseError("LENGTH stream not found in List column");
     rle = createRleDecoder(std::move(stream), false, vers, memoryPool);
-    const Type& childType = *type.getSubtype(0);
-    if (selectedColumns[static_cast<uint64_t>(childType.getColumnId())]) {
-      child = buildReader(childType, stripe);
+    ArrayReadIntent intent = stripe.getReadIntent(columnId);
+    if (intent == ArrayReadIntent_ALL) {
+      const Type &childType = *type.getSubtype(0);
+      if (selectedColumns[static_cast<uint64_t>(childType.getColumnId())]) {
+        child = buildReader(childType, stripe);
+      }

Review comment:
       It is tested at 
[TestColumnReaderEncoded.testListOffsetsOnly](https://github.com/apache/orc/pull/990/files#diff-e0eca596eb78b0688bdb1d04e6a23d5b7c101ff686e99050dbe15147d275ec47R1474),
 which is modified from TestColumnReaderEncoded.testList.
   
   The assertion is
   ```
   ASSERT_EQ(0, longs->numElements);
   ```




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


Reply via email to