paul-rogers commented on code in PR #12633:
URL: https://github.com/apache/druid/pull/12633#discussion_r896263598
##########
processing/src/main/java/org/apache/druid/query/QueryContexts.java:
##########
@@ -188,22 +195,22 @@ public static <T> boolean isUseResultLevelCache(Query<T>
query)
public static <T> boolean isUseResultLevelCache(Query<T> query, boolean
defaultValue)
{
- return parseBoolean(query, "useResultLevelCache", defaultValue);
+ return parseBoolean(query, USE_RESULT_LEVEL_CACHE_KEY, defaultValue);
}
-
public static <T> boolean isFinalize(Query<T> query, boolean defaultValue)
+
{
return parseBoolean(query, FINALIZE_KEY, defaultValue);
}
public static <T> boolean isSerializeDateTimeAsLong(Query<T> query, boolean
defaultValue)
{
- return parseBoolean(query, "serializeDateTimeAsLong", defaultValue);
+ return parseBoolean(query, SERIALIZE_DATE_TIME_AS_LONG_KEY, defaultValue);
}
public static <T> boolean isSerializeDateTimeAsLongInner(Query<T> query,
boolean defaultValue)
{
- return parseBoolean(query, "serializeDateTimeAsLongInner", defaultValue);
+ return parseBoolean(query, SERIALIZE_DATE_TIME_AS_LONG_INNER_KEY,
defaultValue);
Review Comment:
Good point. I didn't really pay attention to the `parseFoo` methods. Those
methods appear to only handle the value-as-string case, where as the `getAsFoo`
method handle maps with values of the expected type. Went ahead and changed the
`parseFoo` methods to use `getAsFoo` so we're consistent.
--
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]