kgyrtkirk opened a new pull request, #15694: URL: https://github.com/apache/druid/pull/15694
As discussed after #15552 was merged (relevant conversation starts from [this comment](https://github.com/apache/druid/pull/15552#issuecomment-1879849582) ) there might be a chance that the patch have caused the `ConstantExpr` classes to be unsafe due to the fact that `ExprEval` is unsafe as it contains a string-caching logic. To become thread-safe for sure - but still retain the benefits of not producing `ExprEval` objects every time a constant is evaluated; this patch adds: * `Expr#singleThreaded` which creates a singleThreaded version of the actual expression (caching ExprEval is allowed) * `Expr#makeSingleThreaded` to make a whole subtree of expressions *singleThreaded* * uses `Shuttle` to create the new expression tree * `ConstantExpr#singleThreaded` creates a specialized `ConstantExpr` which does cache the `ExprEval` * some `@Immutable` annotations were added to make it more likely to notice that there might be something off if a similar change will be made around here for some reason -- 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]
