AlbericByte commented on code in PR #15586:
URL: https://github.com/apache/druid/pull/15586#discussion_r1431999152
##########
processing/src/main/java/org/apache/druid/query/expression/TimestampExtractExprMacro.java:
##########
@@ -73,38 +75,39 @@ public Expr apply(final List<Expr> args)
throw validationFailed("unit arg must be literal");
}
- if (args.size() > 2) {
- validationHelperCheckArgIsLiteral(args.get(2), "timezone");
+ Optional<DateTimeZone> timeZone = Optional.empty();
+ if (args.size() > 2 && args.get(2).isLiteral()) {
+ timeZone = Optional.of(ExprUtils.toTimeZone(args.get(2)));
}
- final Expr arg = args.get(0);
Review Comment:
no reference for this arg, so I removed it.
--
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]