-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix auto limit breaks for Oracle queries #5181
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
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.
Thank you for taking a stab at this! I wonder if it will be "safer" to just turn off this functionality for Oracle?
@arikfr |
@arikfr For me it looks that adding a limit should be implemented in query runners: some basic implementation in BaseQueryRuner, and then others may override it if needed. |
@kravets-levko As redash supports DB2, we probably need to fix the part of DB2 also. |
For what it is worth, I merged @tim5go's code to my branch and can confirm the auto limit is working for Oracle. |
@kravets-levko |
@tim5go and @kravets-levko, we need this fix. Right now, I have it merged locally but it would be great to have it upstream. Any news on getting this merged? It looks like it might need to be rebased on |
@jhult |
@kravets-levko, any chance we can get this merged? |
@rafawendel @kravets-levko @susodapop @arikfr, Any news on merging this? |
Hey @jhult we'll plan to merge this after the full V10 release later this summer. PS we're also working to improve the contribution process and review SLA going forward 😉 Thanks for your patience. |
@susodapop, now that version 10 is out, any updates on getting this merged? |
@susodapop, glad to see you self-assign this. Hopefully this means it can be merged soon. |
* refactoring * add limit text for oracle * simplify logic * add tests for oracle * move tests to query runner * remove unused tests
99c5e75
to
1c15407
Compare
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.
Thanks for your hard work on this! I've tested locally and rebased onto the latest master. Once the CircleCI build completes we're good to merge.
There's a failing test:
Researching now |
The failure was my mistake. I omitted a |
Looks like it built successfully! |
Moves auto limit primitives to the base SQL query runner
What type of PR is this? (check all applicable)
Description
Pull request #5088 introduced the ability to auto limit SQL results to the first 1000 results (#976). However, Oracle does not support the LIMIT clause. This PR is to handle auto limit clause in Oracle's syntax.
Related Tickets & Documents
#5180 #5088
Mobile & Desktop Screenshots/Recordings (if there are UI changes)