-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: wildcard expand + group by doesnt skip expand #990
base: main
Are you sure you want to change the base?
Conversation
const wildcardIndex = column.expand.findIndex(e => e === '*') | ||
if (wildcardIndex === -1) { |
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.
const wildcardIndex = column.expand.findIndex(e => e === '*') | |
if (wildcardIndex === -1) { | |
if (column.expand.includes('*')) { |
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.
Would that mean that:
- For
SELECT Items {*} from Orders group by Items.ID
we would not skip the expand? - For
SELECT Items { ID } from Orders group by Items.ID
we would skip the expand?
→ still seems wrong
As discussed we need to revisit the way we translate OData |
Moreover, and more importantly, we have to ensure that we correctly implement group by, also for things which OData cannot express. In particular, for expands of to-many associations like that: SELECT from Orders {
ID, sum (Items.product.price * Items.quantity) as total,
Items { product.name, quantity }
} group by ID |
Agree 👍
Also agree, however I would make vote for a two step approach:
|
No description provided.