jihoonson commented on a change in pull request #11900:
URL: https://github.com/apache/druid/pull/11900#discussion_r746176337
##########
File path: sql/src/main/java/org/apache/druid/sql/http/SqlQuery.java
##########
@@ -36,7 +36,10 @@
public static List<TypedValue> getParameterList(List<SqlParameter>
parameters)
{
return parameters.stream()
- .map(SqlParameter::getTypedValue)
+ // null params are not good!
+ // we pass them to the planner, so that it can generate a
proper error message.
+ // see SqlParameterizerShuttle and
RelParameterizerShuttle.
+ .map(p -> p == null ? null : p.getTypedValue())
Review comment:
Actually, parameters cannot be null in production code path when you use
SQL over HTTP. This bug exists only for JDBC which doesn't use this method.
This change was for easily mimicking the error case in unit tests.
--
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]