eldenmoon commented on code in PR #52892:
URL: https://github.com/apache/doris/pull/52892#discussion_r2194692786
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -326,6 +327,13 @@ Status SegmentIterator::_init_impl(const
StorageReadOptions& opts) {
if (storage_type == nullptr) {
storage_type =
vectorized::DataTypeFactory::instance().create_data_type(*col);
}
+
+ bool exist = _segment->column_exists(Segment::ColumnIdentifier {
Review Comment:
if the column not exist, the iterator should be `DefaultValueColumnIterator`
maybe you can use this to find out if the column exist or not
##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -604,6 +604,24 @@ vectorized::DataTypePtr Segment::get_data_type_of(const
ColumnIdentifier& identi
return nullptr;
}
Review Comment:
please add test case for your improvement, maybe you could use DebugPoint to
check the case
##########
be/src/vec/exprs/vexpr.cpp:
##########
@@ -722,23 +735,41 @@ Status VExpr::_evaluate_inverted_index(VExprContext*
context, const FunctionBase
}
}
+ auto result_bitmap = segment_v2::InvertedIndexResultBitmap();
+ auto set_result = [&]() {
+ if (!result_bitmap.is_empty()) {
+ index_context->set_inverted_index_result_for_expr(this,
result_bitmap);
+ for (int column_id : column_ids) {
+ index_context->set_true_for_inverted_index_status(this,
column_id);
+ }
+ }
+ };
+
+ if (!variant_column_exist) {
Review Comment:
why is variant special here, what if it is a normal column and not exist in
segment
--
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]