jacktengg commented on code in PR #16938: URL: https://github.com/apache/doris/pull/16938#discussion_r1112511025
########## be/src/vec/olap/vgeneric_iterators.cpp: ########## @@ -374,6 +374,11 @@ Status VUnionIterator::init(const StorageReadOptions& opts) { return Status::OK(); } + // we use back() and pop_back() of std::vector to handle each iterator, Review Comment: As I understand, the VUnionIterator's behaviour is to output data from the list of segment iterators, from begin to end. The user of VUnionIterator is reponsible of the corrrect order of the list of segment iterators, and VUnionIterator should keep the order of output data is the same as the input order of list of segment iterators. As in the code comment, we use back() and pop_back() of std::vector to handle each iterator, so reverse the vector here to keep result block of next_batch to be in the same order as the original segments. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org