ihuzenko commented on a change in pull request #1608: DRILL-6960: Auto Limit
Wrapping should not apply to non-select query
URL: https://github.com/apache/drill/pull/1608#discussion_r253517907
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryResources.java
##########
@@ -83,10 +83,12 @@ public QueryResult submitQueryJSON(QueryWrapper query)
throws Exception {
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_HTML)
public Viewable submitQuery(@FormParam("query") String query,
- @FormParam("queryType") String queryType) throws
Exception {
+ @FormParam("queryType") String queryType,
+ @FormParam("autoLimit") String autoLimit
+ ) throws Exception {
try {
final String trimmedQueryString =
CharMatcher.is(';').trimTrailingFrom(query.trim());
- final QueryResult result = submitQueryJSON(new
QueryWrapper(trimmedQueryString, queryType));
+ final QueryResult result = submitQueryJSON(new
QueryWrapper(trimmedQueryString, queryType, autoLimit)); //QueryWrapper will
validate autoLimit
Review comment:
I think the comment is redundant and may be removed:
```suggestion
final QueryResult result = submitQueryJSON(new
QueryWrapper(trimmedQueryString, queryType, autoLimit));
```
----------------------------------------------------------------
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