github-actions[bot] commented on code in PR #70396:
URL: https://github.com/apache/doris/pull/70396#discussion_r4628470854


##########
be/src/exec/common/variant_util.cpp:
##########
@@ -102,6 +103,31 @@ namespace doris::variant_util {
 
 namespace {
 
+bool same_variant_template(const TabletColumn& lhs, const TabletColumn& rhs) {

Review Comment:
   [P1] Preserve sparse values when adding a template with zero sparse 
statistics
   
   With `variant_max_sparse_column_statistics_size=0`, the shredder still 
stores sparse cells but records no path statistics. If an old row keeps `a` in 
sparse storage (for example, max subcolumns 1 with `{hot:1,a:'old'}`), then 
ALTER adds `a:INT` and a new row writes a typed `a` leaf. This branch adds `a` 
to the compaction schema and enables flat-leaf reads, but the old segment has 
no leaf, no recorded sparse path, and no exceeded-statistics flag, so 
`_build_read_plan_flat_leaves` falls through to `DEFAULT_FILL` and rewrites the 
old value as NULL. Please retain a sparse/full-root fallback whenever 
statistics are unavailable (and add a regression for the zero-limit transition) 
before routing the path to a typed destination.



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