kkhatua commented on a change in pull request #1742: DRILL-7160: e.q.max_rows
QUERY-level option shown even if not set
URL: https://github.com/apache/drill/pull/1742#discussion_r273990569
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
##########
@@ -336,7 +336,8 @@ public String getOperatorsJSON() {
}
public Map<String, String> getQueryOptions() {
- return getOptions(o -> OptionValue.OptionScope.QUERY == o.getScope());
+ // Skip reporting QUERY_MAX_ROWS if it is inapplicable and set to zero
(e.g. query -> SHOW FILES)
+ return getOptions(o -> OptionValue.OptionScope.QUERY == o.getScope() &&
!(ExecConstants.QUERY_MAX_ROWS.equals(o.getName()) &&
String.valueOf(o.getValue()).equals("0")));
Review comment:
Agreed. I am not sure, but I think I did this here
https://github.com/apache/drill/blob/c3ee7949656fb4c1b144e1633f97002c159ec8f3/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java#L120
because of the complexity in the logic and (I think) because without this,
the session value (0) gets precedence when the SYSTEM default exists.
I can revisit this post release to avoid blocking the release for now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services