rip-nsk commented on a change in pull request #903:
URL: https://github.com/apache/orc/pull/903#discussion_r704870004



##########
File path: c++/src/Reader.cc
##########
@@ -385,7 +385,7 @@ namespace orc {
 
   void RowReaderImpl::seekToRowGroup(uint32_t rowGroupEntryId) {
     // store positions for selected columns
-    std::vector<std::list<uint64_t>> positions;
+    std::list<std::list<uint64_t>> positions;

Review comment:
       according to the specs 
(https://en.cppreference.com/w/cpp/container#Iterator_invalidation)
   vector iterators are invalid if insertion changed capacity.
   May be initial capacity of vector changed in new version msvc.
   You probably can reproduce this issue using the following patch:
   `
   --- a/c++/src/Reader.cc
   +++ b/c++/src/Reader.cc
   @@ -401,6 +401,7 @@ namespace orc {
          for (int pos = 0; pos != entry.positions_size(); ++pos) {
            position.push_back(entry.positions(pos));
          }
   +      auto size = position.size(); position.resize(100500); 
position.resize(size);
          positionProviders.insert(std::make_pair(colId, 
PositionProvider(position)));
        }
   `




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