LakshSingla commented on PR #15694: URL: https://github.com/apache/druid/pull/15694#issuecomment-1895478105
I had a question regarding this: The original PR aimed to optimize the case with Expr creating a new ExprEval for every constant expression, which we can do away with. WDYT about creating a precached ExprEval (which is thread-safe) for constant expressions, instead of creating a thread-unsafe `Expr`. Like in the original patch, it isn't on the caller to figure out if the usage will be thread-unsafe, and remember to call it and the code won't have to traverse the expression tree. The only downside will be pre-caching computing unnecessary stuff, however in one of the comments I read that we do call `toString()` most of the time, so perhaps it's not as bad. -- 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]
