gianm commented on code in PR #12633:
URL: https://github.com/apache/druid/pull/12633#discussion_r896231775
##########
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:
Is there any reason for `parseBoolean` and `getAsBoolean` to remain
different? Now that we have `getAsBoolean`, shall it replace `parseBoolean`?
(Btw, is the behavior the same? I haven't checked)
##########
processing/src/main/java/org/apache/druid/query/QueryContexts.java:
##########
@@ -248,7 +255,7 @@ public static <T> int getUncoveredIntervalsLimit(Query<T>
query)
public static <T> int getUncoveredIntervalsLimit(Query<T> query, int
defaultValue)
{
- return parseInt(query, "uncoveredIntervalsLimit", defaultValue);
+ return parseInt(query, UNCOVERED_INTERVALS_LIMIT_KEY, defaultValue);
Review Comment:
Is there any reason for `parseInt` and `getAsInt` to remain different? Now
that we have `getAsInt`, shall it replace `parseInt`?
(Btw, is the behavior the same? I haven't checked)
--
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]