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


##########
be/src/olap/rowset/segment_v2/variant_column_writer_impl.cpp:
##########
@@ -337,7 +349,34 @@ Status 
VariantColumnWriterImpl::_process_subcolumns(vectorized::ColumnObject* pt
 
         // create subcolumn writer
         int current_column_id = column_id++;
-        TabletColumn tablet_column = generate_column_info(entry);
+        TabletColumn tablet_column;
+        int64_t none_null_value_size = -1;
+        vectorized::ColumnPtr current_column;
+        if (auto current_path = entry->path.get_path();
+            _subcolumns_info.find(current_path) != _subcolumns_info.end()) {
+            tablet_column = _subcolumns_info[current_path].column;
+            vectorized::DataTypePtr storage_type =
+                    
vectorized::DataTypeFactory::instance().create_data_type(tablet_column);
+            vectorized::DataTypePtr finalized_type = 
entry->data.get_least_common_type();
+            current_column = entry->data.get_finalized_column_ptr()->get_ptr();
+            if (!storage_type->equals(*finalized_type)) {
+                RETURN_IF_ERROR(vectorized::schema_util::cast_column(
+                        {current_column, finalized_type, ""}, storage_type, 
&current_column));
+            }
+            if (auto index = _subcolumns_info[current_path].index; index) {
+                _subcolumns_indexes[current_column_id] = 
std::make_unique<TabletIndex>(*index);
+                
_subcolumns_indexes[current_column_id]->set_escaped_escaped_index_suffix_path(

Review Comment:
   add constructor for `suffix_path` like TabletIndex(const std::string& 
sufffix)



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