fix: Row limit hardcoded (#26807)

This commit is contained in:
Michael S. Molina 2024-01-26 08:57:21 -05:00 committed by GitHub
parent 23460b21f6
commit 5e633d2bb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -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),

View File

@ -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

View File

@ -61,7 +61,7 @@ if "sqlite" in SQLALCHEMY_DATABASE_URI:
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,