clintropolis commented on a change in pull request #11853:
URL: https://github.com/apache/druid/pull/11853#discussion_r744013551



##########
File path: 
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java
##########
@@ -74,10 +75,12 @@ public void reduce(
         final Expr expr = Parser.parse(druidExpression.getExpression(), 
plannerContext.getExprMacroTable());
 
         final ExprEval exprResult = expr.eval(
-            name -> {
-              // Sanity check. Bindings should not be used for a constant 
expression.
-              throw new UnsupportedOperationException();
-            }
+            InputBindings.forFunction(
+                name -> {
+                  // Sanity check. Bindings should not be used for a constant 
expression.
+                  throw new UnsupportedOperationException();

Review comment:
       I think this should never ever happen and we could probably just use 
`InputBindings.nilBindings()`, but I didn't really want to change the logic so 
I kept it. I can change the exception message to be better though :+1:




-- 
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]

Reply via email to