eldenmoon commented on code in PR #43003:
URL: https://github.com/apache/doris/pull/43003#discussion_r1825602621


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1057,16 +1057,18 @@ Status 
SegmentIterator::_init_inverted_index_iterators() {
         return Status::OK();
     }
     for (auto cid : _schema->column_ids()) {
+        // Use segment’s own index_meta, for compatibility with future 
indexing needs to default to lowercase.
         if (_inverted_index_iterators[cid] == nullptr) {
-            // Not check type valid, since we need to get inverted index for 
related variant type when reading the segment.
-            // If check type valid, we can not get inverted index for variant 
type, and result nullptr.The result for calling
-            // get_inverted_index with variant suffix should return 
corresponding inverted index meta.
-            bool check_inverted_index_by_type = false;
-            // Use segment’s own index_meta, for compatibility with future 
indexing needs to default to lowercase.
+            // In the _opts.tablet_schema, the sub-column type information for 
the variant is FieldType::OLAP_FIELD_TYPE_VARIANT.
+            // This is because the sub-column is created in 
create_materialized_variant_column.
+            // We use this column to locate the metadata for the inverted 
index, which requires a unique_id and path.
+            const auto& column = _opts.tablet_schema->column(cid);

Review Comment:
   maybe we could hide this impl in _tablet_schema->inverted_index(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: 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

Reply via email to