ihuzenko commented on issue #1608: DRILL-6960: Auto Limit Wrapping should not apply to non-select query URL: https://github.com/apache/drill/pull/1608#issuecomment-453509919 @kkhatua In my opinion it would be better to implement the feature on the back-end side. In such case UI only should validate that when 'Limit results to' checkbox is enabled user must provide valid integer number (only digits without any other signs). For the backend side I can't give you full solution now, but you could try something like this inside DrillSqlWorker.getQueryPlan: ``` if (context.isAutoLimitEnabled() && sqlNode instanceof SqlSelect) { String limit = context.getAutoLimitRowCount(); // limit passed from UI SqlNumericLiteral fetch = SqlNumericLiteral.createExactNumeric(limit, sqlNode.getParserPosition()); ((SqlSelect)sqlNode).setFetch(fetch); } ```
---------------------------------------------------------------- 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
