gianm commented on code in PR #15694:
URL: https://github.com/apache/druid/pull/15694#discussion_r1479196569


##########
processing/src/main/java/org/apache/druid/math/expr/Expr.java:
##########
@@ -758,4 +758,25 @@ private static Set<String> map(
       return results;
     }
   }
+
+  /**
+   * Returns a possibly less safe version of this expression.
+   *
+   * For top level expressions use {@link Expr#makeSingleThreaded(Expr)} to
+   * obtain the single-threaded version of the expression tree.
+   */
+  default Expr singleThreaded()

Review Comment:
   This part is a usage mistake waiting to happen. People will call 
`expr.singleThreaded()` and then be surprised that it doesn't actually make a 
single-threaded expr tree. IMO it's better for this method to apply a visitor 
that goes and replaces all the ConstantExprs, even though it takes some control 
away from non-constant Exprs to customize their behavior.



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