rizaon commented on a change in pull request #990: URL: https://github.com/apache/orc/pull/990#discussion_r779228415
########## File path: c++/src/Options.hh ########## @@ -174,20 +175,36 @@ namespace orc { privateBits->selection = ColumnSelection_FIELD_IDS; privateBits->includedColumnIndexes.assign(include.begin(), include.end()); privateBits->includedColumnNames.clear(); + privateBits->readIntents.clear(); return *this; } RowReaderOptions& RowReaderOptions::include(const std::list<std::string>& include) { privateBits->selection = ColumnSelection_NAMES; privateBits->includedColumnNames.assign(include.begin(), include.end()); privateBits->includedColumnIndexes.clear(); + privateBits->readIntents.clear(); return *this; } RowReaderOptions& RowReaderOptions::includeTypes(const std::list<uint64_t>& types) { privateBits->selection = ColumnSelection_TYPE_IDS; privateBits->includedColumnIndexes.assign(types.begin(), types.end()); privateBits->includedColumnNames.clear(); + privateBits->readIntents.clear(); + return *this; + } + + RowReaderOptions& + RowReaderOptions::includeTypesWithIntents(const TypeReadIntents& typesAndIntents) { + privateBits->selection = ColumnSelection_TYPE_IDS; + privateBits->includedColumnIndexes.clear(); + privateBits->readIntents.clear(); + for (const auto& typeIntentPair : typesAndIntents ) { + privateBits->readIntents[typeIntentPair.first] = typeIntentPair.second; Review comment: I think I missed a case here. Suppose we select two nested list columns, both with `ArrayReadIntent_OFFSETS`. We need to override the parent list intent to `ArrayReadIntent_ALL` in `ColumnSelector::selectParents()`. Otherwise, the children list will not be read. -- 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: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org