adonis0147 commented on code in PR #9466: URL: https://github.com/apache/incubator-doris/pull/9466#discussion_r873471858
########## be/src/runtime/collection_value.h: ########## @@ -137,45 +141,110 @@ struct CollectionValue { friend ArrayIterator; }; -/** - * Array's Iterator, support read array by special type - */ class ArrayIterator { -private: - ArrayIterator(PrimitiveType children_type, const CollectionValue* data); - public: - bool seek(uint32_t n) { - if (n >= _data->size()) { + int type_size() const { return _type_size; } + bool is_type_fixed_width() const { return _is_type_fixed_width; } + + bool has_next() const { return _offset < _collection_value->size(); } + bool next() const { + if (has_next()) { + ++_offset; + return true; + } + return false; + } + bool seek(int n) const { + if (n >= _collection_value->size()) { Review Comment: Fixed. -- 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