diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx index 4396f4f2e9495..56f3bc246e421 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx @@ -245,10 +245,10 @@ const row_limit: SharedControlConfig<'SelectControl'> = { freeForm: true, label: t('Row limit'), clearable: false, + mapStateToProps: state => ({ maxValue: state?.common?.conf?.SQL_MAX_ROW }), validators: [ legacyValidateInteger, - (v, state) => - validateMaxValue(v, state?.common?.conf?.SQL_MAX_ROW || DEFAULT_MAX_ROW), + (v, state) => validateMaxValue(v, state?.maxValue || DEFAULT_MAX_ROW), ], default: 10000, choices: formatSelectOptions(ROW_LIMIT_OPTIONS), diff --git a/tests/integration_tests/celery_tests.py b/tests/integration_tests/celery_tests.py index 29a1f7a66afa0..b0ac6ac6c7ed4 100644 --- a/tests/integration_tests/celery_tests.py +++ b/tests/integration_tests/celery_tests.py @@ -344,7 +344,7 @@ def test_run_async_cta_query_with_lower_limit(test_client, ctas_method): assert QUERY == query.sql assert query.rows == (1 if backend() == "presto" else 0) - assert query.limit == 10000 + assert query.limit == 50000 assert query.select_as_cta assert query.select_as_cta_used diff --git a/tests/integration_tests/superset_test_config.py b/tests/integration_tests/superset_test_config.py index 89287be663e55..60b2d1107e508 100644 --- a/tests/integration_tests/superset_test_config.py +++ b/tests/integration_tests/superset_test_config.py @@ -60,7 +60,7 @@ PRESTO_POLL_INTERVAL = 0.1 HIVE_POLL_INTERVAL = 0.1 -SQL_MAX_ROW = 10000 +SQL_MAX_ROW = 50000 SQLLAB_CTAS_NO_LIMIT = True # SQL_MAX_ROW will not take effect for the CTA queries FEATURE_FLAGS = { **FEATURE_FLAGS,