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
OLAP functionality. #27646 #12807
OLAP functionality. #27646 #12807
Conversation
'# Please enter the commit message for your changes. Lines starting
5cbcb3a
to
8c748ae
Compare
@adamchainz @hannseman You've both set yourself as watchers on the ticket. I think it's difficult to solve this without including a new method for manually controlling this. I need to add a link to the mailing list thread for this in this PR. |
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.
Looking forward to the mailing list update - haven't got much time to review right now I'm afraid.
def __init__(self, query: Query, connection, using): | ||
self.custom_group_by = False | ||
self.query = query # type: Query |
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.
we don't do type hints yet as per django/deps#65 and corresponding mailing list
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.
I know! :) It's just for personal use while developing this. IDE assistance is considerably better with
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.
Okay 👍 One day...
@adamchainz https://groups.google.com/g/django-developers/c/8WVd64QaOfE/m/U7q8XelMBAAJ is the mailing list discussion about this. |
Co-authored-by: Adam Johnson <me@adamj.eu>
Closing due to inactivity. @atombrella Feel-free to send a new patch when you have time, thanks. |
It's rather in-complete, and basically only an outline of how I think ticket #27646 could be approached. I don't see an easy way to solve this ticket, without introducing a manual method for dealing with the group by clause. @adamchainz mentioned on IRC that the name might make people who know SQL to use this without considering that Django by default does a good job of handling this for you, when using
QuerySet.annotate
.I'll write a post about this to the mailing list later, as Tim Graham requested this.
It's only a draft. I think targeting this at 3.2 would seem possible. No tests are in this draft (it's cumbersome to write them, and I'd like to have some simplicity).