csun5285 commented on code in PR #36163:
URL: https://github.com/apache/doris/pull/36163#discussion_r1642509686


##########
be/src/olap/tablet_schema.cpp:
##########
@@ -1367,7 +1367,13 @@ const TabletIndex* 
TabletSchema::get_inverted_index(int32_t col_unique_id,
     return nullptr;
 }
 
-const TabletIndex* TabletSchema::get_inverted_index(const TabletColumn& col) 
const {
+const TabletIndex* TabletSchema::get_inverted_index(const TabletColumn& col,
+                                                    bool check_valid) const {
+    // With check_valid set to true by default
+    // Some columns from the variant do not support inverted index
+    if (check_valid && 
!segment_v2::InvertedIndexColumnWriter::check_column_valid(col)) {

Review Comment:
   done



##########
be/src/olap/tablet_schema.h:
##########
@@ -368,7 +368,10 @@ class TabletSchema {
     bool has_inverted_index_with_index_id(int64_t index_id, const std::string& 
suffix_path) const;
     const TabletIndex* get_inverted_index_with_index_id(int64_t index_id,
                                                         const std::string& 
suffix_name) const;
-    const TabletIndex* get_inverted_index(const TabletColumn& col) const;
+    // check_valid: check if this column supports inverted index
+    // Some columns from the variant do not support index, but they are listed 
in TabletIndex.

Review Comment:
   done



-- 
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]

Reply via email to