ihuzenko commented on a change in pull request #1608: DRILL-6960: AutoLimit the
size of ResultSet for a WebUI (or REST) client
URL: https://github.com/apache/drill/pull/1608#discussion_r257209713
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
##########
@@ -273,6 +279,29 @@ public RemoteFunctionRegistry getRemoteFunctionRegistry()
{
return drillbitContext.getRemoteFunctionRegistry();
}
+ /**
+ * Check if auto-limiting of resultset is enabled
+ * @return True if auto-limit is enabled
+ */
+ public boolean isAutoLimitEnabled() {
+ return autoLimitRowCount != null;
+ }
+
+ /**
+ * Returns the maximum size of auto-limited resultset
+ * @return Maximum size of auto-limited resultSet
+ */
+ public Integer getAutoLimitRowCount() {
Review comment:
@kkhatua , I think adding new query scope option isn't a bad idea, because
now same ```autoLimitRowCount``` and related methods are spread across lots of
places, and if it's possible to minimize the duplication let's give it a try.
Also options can have good long descriptions where you can mention all details
about how it's used and why it was added.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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