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


##########
be/src/exec/common/variant_util.cpp:
##########
@@ -956,13 +956,17 @@ Status 
VariantCompactionUtil::aggregate_variant_extended_info(
 void VariantCompactionUtil::get_subpaths(int32_t max_subcolumns_count,
                                          const PathToNoneNullValues& stats,
                                          TabletSchema::PathsSetInfo& 
paths_set_info) {
-    // max_subcolumns_count is 0 means no limit
-    if (max_subcolumns_count > 0 && stats.size() > max_subcolumns_count) {
-        std::vector<std::pair<size_t, std::string_view>> paths_with_sizes;
-        paths_with_sizes.reserve(stats.size());
-        for (const auto& [path, size] : stats) {
-            paths_with_sizes.emplace_back(size, path);
+    std::vector<std::pair<size_t, std::string_view>> paths_with_sizes;
+    paths_with_sizes.reserve(stats.size());

Review Comment:
   这里改动是为了让普通 path 在 `stats.size() <= max_subcolumns_count` 时走全量 
materialize分支;只有超过上限时才排序选 top-N、剩余进 sparse。typed path 不依赖这里的 size,它前面通过 
`get_compaction_typed_columns()` 单独处理。



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