jt2594838 commented on code in PR #706:
URL: https://github.com/apache/tsfile/pull/706#discussion_r2801880185


##########
cpp/src/common/tsblock/tuple_desc.h:
##########
@@ -76,6 +76,15 @@ class TupleDesc {
         return column_list_[index].column_category_;
     }
 
+    FORCE_INLINE int get_time_column_index() const {
+        for (uint32_t i = 0; i < column_list_.size(); i++) {
+            if (column_list_[i].get_column_category() == ColumnCategory::TIME) 
{
+                return i;
+            }
+        }
+        return -1;
+    }

Review Comment:
   Save the index to avoid iteration every time.



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

Reply via email to