FrankChen021 commented on code in PR #13022:
URL: https://github.com/apache/druid/pull/13022#discussion_r965779945


##########
processing/src/main/java/org/apache/druid/query/QueryContexts.java:
##########
@@ -503,7 +487,24 @@ public static String getAsString(
     } else if (value instanceof String) {
       return (String) value;
     } else {
-      throw new IAE("Expected parameter [%s] to be String", parameter);
+      throw new IAE("Expected parameter [%s] to be a String, but got [%s]", 
parameter, value.getClass().getName());
+    }
+  }
+
+  @Nullable
+  public static Boolean getAsBoolean(
+      final String parameter,
+      final Object value

Review Comment:
   A `parseBoolean` is still kept at line 474 in this class to allow to parse a 
value from a map object.



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