yiguolei commented on code in PR #66472:
URL: https://github.com/apache/doris/pull/66472#discussion_r3764369014
##########
be/src/storage/iterator/vgeneric_iterators.cpp:
##########
@@ -93,27 +93,12 @@ Status VStatisticsIterator::next_batch(Block* block) {
return Status::EndOfFile("End of VStatisticsIterator");
}
-// Build the block using the output schema, which contains only the columns
-// the caller requested (return_columns). Delete predicate columns are excluded
-// because SegmentIterator handles them independently:
-// - _init_current_block() skips predicate columns (including delete
predicates)
-// via the _is_pred_column[cid] check, so it never accesses the block by
those positions.
-// - _output_non_pred_columns() checks loc < block->columns() before filling
any column,
-// so delete predicate columns (whose loc exceeds block->columns()) are
simply skipped.
-// - Delete predicate evaluation happens entirely through
_current_return_columns and
-// _evaluate_short_circuit_predicate(), which are independent of the block
structure.
Status VMergeIteratorContext::block_reset(const std::shared_ptr<Block>& block)
{
if (!block->columns()) {
- const auto& column_ids = _output_schema->column_ids();
- for (size_t i = 0; i < _output_schema->num_column_ids(); ++i) {
- auto column_desc = _output_schema->column(column_ids[i]);
- auto data_type = Schema::get_data_type_ptr(*column_desc);
- if (data_type == nullptr) {
- return Status::RuntimeError("invalid data type");
- }
- auto column = data_type->create_column();
+ *block = _read_schema->create_read_block();
Review Comment:
我感觉,我们可能确实得在read schema 中,对于struct 列裁剪这种,我们得把它的column 结构改掉。 不能依靠传递一个data
type。
否则很多地方如果有人去把tablet column 拿出来,做一些事情,比如创建一个column 似乎结构就不对了
--
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]