abhishekrb19 commented on code in PR #18762:
URL: https://github.com/apache/druid/pull/18762#discussion_r2547354667
##########
processing/src/main/java/org/apache/druid/query/expression/RegexpReplaceExprMacro.java:
##########
@@ -96,7 +96,7 @@ private RegexpReplaceExpr(List<Expr> args)
final String patternString = (String) patternExpr.getLiteralValue();
this.arg = args.get(0);
- this.pattern = patternString != null ? Pattern.compile(patternString) :
null;
Review Comment:
Yeah, this is okay because the original null semantics is retained at this
call site.
`RegexpExprUtils.compilePattern()` is called only when `patternString` is
null, otherwise `pattern` continues to remain null
--
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]