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? ![image](https://user-images.githubusercontent.com/20928429/52267594-177a9280-2942-11e9-8a55-c00353da8a81.png) ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services