diff --git a/superset-frontend/src/SqlLab/components/SqlEditor.jsx b/superset-frontend/src/SqlLab/components/SqlEditor.jsx index 75028eae7fc69..3b2e93649a0f6 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor.jsx @@ -539,9 +539,13 @@ class SqlEditor extends React.PureComponent { } renderQueryLimit() { - const menuDropdown = ( + // Adding SQL_MAX_ROW value to dropdown + const { maxRow } = this.props; + LIMIT_DROPDOWN.push(maxRow); + + return ( - {LIMIT_DROPDOWN.map(limit => ( + {[...new Set(LIMIT_DROPDOWN)].map(limit => ( this.setQueryLimit(limit)}> {/* // eslint-disable-line no-use-before-define */} @@ -551,8 +555,6 @@ class SqlEditor extends React.PureComponent { ))} ); - - return menuDropdown; } renderEditorBottomBar() {