Skip to content

Commit

Permalink
fix: Row limit hardcoded (apache#26807)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored Jan 26, 2024
1 parent 23460b2 commit 5e633d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,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),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/celery_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/superset_test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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,
Expand Down

0 comments on commit 5e633d2

Please sign in to comment.