foxtail463 commented on code in PR #67295:
URL: https://github.com/apache/doris/pull/67295#discussion_r4023029807


##########
be/src/storage/tablet/base_tablet.cpp:
##########
@@ -1083,10 +1135,22 @@ Status 
BaseTablet::generate_new_block_for_partial_update(
     // rowid in the final block(start from 0, increase continuously) -> rowid 
to read in update_block
     std::map<uint32_t, uint32_t> read_index_update;
 
-    // read current rowset first, if a row in the current rowset has delete 
sign mark
-    // we don't need to read values from old block
+    // Row-store and physical Variant columns are not always 
representation-equivalent. A typed
+    // Variant path can be coerced by the column writer after RowStoreFill 
(for example, string
+    // "001" becomes integer 1), so rebuilding a conflicting row from physical 
Variant columns
+    // would make its row-store value depend on whether a publish conflict 
occurred. Keep the
+    // row-store path for projections containing Variant; fixed updates of 
ordinary columns can use
+    // the narrower physical-column read.
+    const bool update_contains_variant = std::ranges::any_of(update_cids, 
[&](uint32_t cid) {
+        return rowset_schema->column(cid).is_variant_type();
+    });
+    const auto update_read_strategy =
+            partial_update_info->is_fixed_partial_update() && 
!update_contains_variant

Review Comment:
   已验证启发式选择效果已经很好
   
   通过列数判断不靠谱,因为列与列之间差的很多
   
   如果要通过统计信息来判断,会增加很多复杂度
   
   综上,先维持现状



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