pranavbhole commented on code in PR #14956:
URL: https://github.com/apache/druid/pull/14956#discussion_r1320843020
##########
processing/src/main/java/org/apache/druid/query/expression/LookupExprMacro.java:
##########
@@ -116,4 +126,15 @@ public void decorateCacheKeyBuilder(CacheKeyBuilder
builder)
return new LookupExpr(arg);
}
+
+ private String getReplaceMissingValueWith(final List<Expr> args)
+ {
+ if (args.size() > 2) {
+ final Expr missingValExpr = args.get(2);
+ if (missingValExpr.isLiteral()) {
+ return missingValExpr.getLiteralValue().toString();
Review Comment:
Nope, regardless of the sqlCompatibleMode, replaceMissingValueWith is
literal value passed by user and feature expect to replace it as it is.
##########
docs/querying/lookups.md:
##########
@@ -62,6 +62,12 @@ SELECT
FROM sales
GROUP BY 1
```
+Lookup function also accepts the 3rd argument called
`$replaceMissingValueWith` as constant string, if you value is missing given
lookups for queried key then lookup function return result value from
`replaceMissingValueWith`
Review Comment:
fixed
--
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]