jenwit
11/03/2026, 1:45 AMRocky
11/03/2026, 1:46 AMjenwit
11/03/2026, 1:55 AM// Cloud Native Table is not yet optimized for bucket aggregation.
if (scan.getTable().isCloudNativeTableOrMaterializedView()) {
return null;
}
Rocky
11/03/2026, 1:55 AMGlobalAggregateOptimizer because the planner might not yet correctly estimate the costs or handle edge cases where Lake tables are involved in complex JOIN + AGGREGATE pipelines that expect specific data distributions.
* Version Dependency: If you are running StarRocks v3.3.9+, v3.4.2+, or v3.5, the most severe correctness bugs (including #63849) have been addressed.
Recommendation
If you choose to remove the block for testing:
1. Verify Results: Run your queries with and without the optimization and compare the results carefully using large datasets.
2. Check Your Version: Ensure you have at least the fixes from v3.3.9 or v3.4.2 to avoid the "wrong result" bug you originally referenced.
3. Monitor Performance: "Optimized" in the comment also refers to performance. Without proper tablet-affinity scheduling on CNs, enabling this might actually result in suboptimal task distribution or excessive remote I/O if the cache is cold.
For production environments, it is best to wait for an official release where this optimization is enabled by default, indicating it has passed the community's full regression suite for the shared-data architecture.
References
• faq/shared_data_faq.md
• table_design/data_distribution/Data_distribution.md
• best_practices/bucketing.mdjenwit
11/03/2026, 2:01 AMRocky
11/03/2026, 2:02 AM