vvysotskyi 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_r253807881
##########
File path: exec/java-exec/src/main/resources/rest/static/js/querySubmission.js
##########
@@ -53,7 +53,18 @@ function doSubmitQueryWithUserName() {
//Wrap & Submit Query (invoked directly if impersonation is not enabled)
function wrapAndSubmitQuery() {
//Wrap if required
- wrapQuery();
+ var mustWrapWithLimit = $('input[name="forceLimit"]:checked').length > 0;
+ //Clear field when submitting if not mustWrapWithLimit
+ if (!mustWrapWithLimit) {
+ //Wipe out any numeric entry in the field before
+ $('#autoLimit').attr('value', '');
+ } else {
+ let autoLimitValue=document.getElementById("autoLimit").value;
+ if (isNaN(autoLimitValue)) {
+ alert(autoLimitValue+ " is not a number. Please fill in a valid
number");
Review comment:
I disagree with leaving alert as it is. Can be shown the error message
similar to the case when the wrong configuration for storage plugin is
submitted?

----------------------------------------------------------------
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