Skip to content

feat: add rows limit to query settings - #1291

Merged
astandrik merged 21 commits into
mainfrom
astandrik.add-rows-limit-to-query-settings-1253
Sep 23, 2024
Merged

astandrik merged 21 commits into
mainfrom
astandrik.add-rows-limit-to-query-settings-1253

Conversation

@astandrik

@astandrik astandrik commented Sep 13, 2024 •

Copy link
Copy Markdown
Contributor

Closes #1253

Stand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
124 123 0 1 0

Bundle Size: 🔺

Current: 79.01 MB | Main: 78.99 MB
Diff: +0.02 MB (0.02%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

name="limitRows"
control={control}
render={({field}) => (
<React.Fragment>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fragment is redundant

{QUERY_SETTINGS_FIELD_SETTINGS.limitRows.title}
</label>
<div className={b('control-wrapper')}>
<Controller

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add validation in Controller?

Comment thread src/store/reducers/executeQuery.ts Outdated
querySettings.tracingLevel && enableTracingLevel
? TracingLevelNumber[querySettings.tracingLevel]
: undefined,
limit_rows: querySettings.limitRows || undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it be possible to run query without this setting at all?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now it is running without this setting

or I didnt get your idea

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to double-check that limit_rows may be undefined and nothing breaks!

Comment thread src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Outdated
@astandrik
astandrik requested a review from ValeraS September 16, 2024 14:00
Comment thread src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Outdated
Comment thread src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Outdated
Comment thread src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Outdated

@ValeraS ValeraS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you need to update some tests.

@astandrik

Copy link
Copy Markdown
Contributor Author

@ValeraS Actually we cant use z.coerce as it changes the original values

@ValeraS

ValeraS commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

@ValeraS Actually we cant use z.coerce as it changes the original values

Why are timeout and rows limit not numbers?

@astandrik

Copy link
Copy Markdown
Contributor Author

@ValeraS Actually we cant use z.coerce as it changes the original values

Why are timeout and rows limit not numbers?

I suppose it's because TextInput works with strings

@ValeraS

ValeraS commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

@ValeraS Actually we cant use z.coerce as it changes the original values

Why are timeout and rows limit not numbers?

I suppose it's because TextInput works with strings

How types of query options depend on view(TextInput)?

@astandrik

Copy link
Copy Markdown
Contributor Author

@ValeraS Actually we cant use z.coerce as it changes the original values

Why are timeout and rows limit not numbers?

I suppose it's because TextInput works with strings

How types of query options depend on view(TextInput)?

no need in typecasts in view props

@astandrik
astandrik requested a review from ValeraS September 18, 2024 13:25
Comment thread src/utils/query.ts
Comment thread src/utils/query.ts Outdated
Comment thread src/utils/hooks/useQueryExecutionSettings.ts Outdated
Comment thread src/utils/hooks/useLastQueryExecutionSettings.ts Outdated
@astandrik
astandrik requested a review from ValeraS September 19, 2024 10:30
@astandrik
astandrik merged commit 1728e61 into main Sep 23, 2024
@astandrik
astandrik deleted the astandrik.add-rows-limit-to-query-settings-1253 branch September 23, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add rows limit to query settings

3 participants