Copilot commented on code in PR #57522:
URL: https://github.com/apache/doris/pull/57522#discussion_r2488967115
##########
be/src/vec/olap/vcollect_iterator.cpp:
##########
@@ -456,7 +456,8 @@
VCollectIterator::Level0Iterator::Level0Iterator(RowsetReaderSharedPtr rs_reader
}
Status VCollectIterator::Level0Iterator::init(bool get_data_by_ref) {
- _get_data_by_ref = get_data_by_ref &&
_rs_reader->support_return_data_by_ref();
+ _is_merge_iterator = _rs_reader->is_merge_iterator();
+ _get_data_by_ref = get_data_by_ref && _is_merge_iterator;
Review Comment:
The logic for `_get_data_by_ref` has changed from `get_data_by_ref &&
_rs_reader->support_return_data_by_ref()` to `get_data_by_ref &&
_is_merge_iterator`. However, the original logic checked if the reader supports
returning data by reference, while the new logic only checks if it's a merge
iterator. This changes the semantics - the code now assumes all merge iterators
support data by reference, which may not be the intended behavior. Consider
verifying this assumption or restoring the original check.
```suggestion
_get_data_by_ref = get_data_by_ref &&
_rs_reader->support_return_data_by_ref();
```
##########
be/src/olap/iterators.h:
##########
@@ -172,36 +179,48 @@ class RowwiseIterator {
// Return Status::OK() if init successfully,
// Return other error otherwise
virtual Status init(const StorageReadOptions& opts) {
- return Status::NotSupported("to be implemented");
+ return Status::InternalError("to be implemented, current class: " +
+ demangle(typeid(*this).name()));
Review Comment:
The `demangle` function is used but not included. The header file
`vec/common/demangle.h` needs to be included at the top of this file for the
code to compile.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]