kkhatua 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_r252798223
########## 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: We're already using the alert mechanism for empty username (when impersonation is enabled). In both cases, we want to indicate that the user cannot progress because of a missing username or invalid number. An error message on the query page might get missed. ---------------------------------------------------------------- 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