morrySnow commented on code in PR #62980:
URL: https://github.com/apache/doris/pull/62980#discussion_r3534584849


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DataTrait.java:
##########
@@ -48,7 +48,7 @@
  *                   then values in column 'b' must also be identical.
  */
 public class DataTrait {
-
+    public static int UNIQUE_UNION_LIMIT = 16;

Review Comment:
   `UNIQUE_UNION_LIMIT` should be declared `final`. As a `public static int` 
without `final`, any code in the JVM can mutate this value at runtime. Setting 
it to `0` would silently disable all union propagation (causing missed 
optimizations), and setting it to `Integer.MAX_VALUE` could cause excessive 
unique-set combinations and OOM in the optimizer for complex queries.
   
   ```suggestion
       public static final int UNIQUE_UNION_LIMIT = 16;
   ```



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