-
Notifications
You must be signed in to change notification settings - Fork 2.8k
do not use sub-query for permission limit if aggregations are not present #2630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Deploy preview for hasura-docs ready! Built with commit 36c6cbd |
|
Review app for commit d1cf004 deployed to Heroku: https://hge-ci-pull-2630.herokuapp.com |
…g merged with aggregate select one
|
Review app for commit 03e0840 deployed to Heroku: https://hge-ci-pull-2630.herokuapp.com |
|
Review app for commit 7a8b8e8 deployed to Heroku: https://hge-ci-pull-2630.herokuapp.com |
0x777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Review app for commit 36c6cbd deployed to Heroku: https://hge-ci-pull-2630.herokuapp.com |
|
Review app https://hge-ci-pull-2630.herokuapp.com is deleted |
Description
The change related to permission limits in #2027 has slow down the queries. This PR fixes that.
Affected components
Related Issues
N/A
Solution and Design
The presence of aggregations in queries affects the usage of a subquery in selecting JSON rows. If aggregations present, then use subquery for permission limit.
The application of limit in
BaseNodedepends on whether a subquery is being used.Refer
Files changedfor in-depth details.To Reviewer
Only
src-lib/Hasura/RQL/DML/Select/Internal.hsmodule is changed and a utility type is added insrc-lib/Hasura/RQL/DML/Select/Types.hsSteps to test and verify
Define permission to a table with a limit. Make a
<table-name>_aggregatequery with and withoutaggregatefield. Look for the generated SQL statement using theAnalyzebutton on the console.Limitations, known bugs & workarounds