sreemanamala commented on code in PR #15964:
URL: https://github.com/apache/druid/pull/15964#discussion_r1510555069
##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/SqlParameterizerShuttle.java:
##########
@@ -129,13 +129,12 @@ private SqlNode createArrayLiteral(Object value, int posn)
List<SqlNode> args = new ArrayList<>(list.size());
for (int i = 0, listSize = list.size(); i < listSize; i++) {
Object element = list.get(i);
- if (element == null) {
- throw InvalidSqlInput.exception("parameter [%d] is an array, with an
illegal null at index [%d]", posn + 1, i);
- }
SqlNode node;
- if (element instanceof String) {
+ if (element == null) {
+ node = SqlLiteral.createNull(SqlParserPos.ZERO);
+ } else if (element instanceof String) {
node = SqlLiteral.createCharString((String) element,
SqlParserPos.ZERO);
- } else if (element instanceof Integer || element instanceof Long) {
+ } else if (element instanceof Integer || element instanceof Long ||
element instanceof Double) {
Review Comment:
Even I thought so. But little worried about in filter converting them to
Strings. Havent completely gone through it. Let me check and change it to
approx numeric.
--
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]