Skip to content

Conversation

@iwakiriK
Copy link
Contributor

@iwakiriK iwakiriK commented Aug 30, 2021

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Cannot execute a query with "limit all" while auto-limit is checked.

image

This PR will fix this problem.

Related Tickets & Documents

https://www.postgresql.org/docs/9.6/queries-limit.html

@guidopetri
Copy link
Contributor

@iwakiriK , thanks for the PR! We've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI, as well as updating merge conflicts?

We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that.

@justinclift
Copy link
Member

justinclift commented Aug 22, 2023

The approach of manually checking for the presence of LIMIT and ALL like this feels like it would work ok for simple queries, but would potentially get caught out by complex ones.

That being said, nothing is springing to mind of a query that would go wrong with this, so it could just be an incorrect fear on my part. 😄

@justinclift
Copy link
Member

Was thinking about trying to resolve the merge conflict using the web interface. However the web interface doesn't seem suited to the problem here, where the functions have been moved to a different file.

For example, query_is_select_no_limit() has been moved to redash/query_runner/__init__.py:

def query_is_select_no_limit(self, query):

It'll probably need adjusting manually using a proper development environment instead.

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.

3 participants