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
ungroup
should return a stream if given a stream
#2719
Comments
@mlucy -- what's the expected behavior in this case? |
This is possible in the specific case where you're grouping by an index, and I think we should support it. I'd classify it as a proposal because it requires new logic, it isn't a matter of just fixing broken behavior. Tagging as a proposal and putting in 1.14-polish. |
From an API perspective I think this is clear, but putting in reql-discussion for bureaucratic reasons. Does anyone object if we mark it as settled? |
No objections. |
Moving out of |
This comes up quite a bit in user queries btw. I'm not sure if we'll have time to do this in 2.2, but we should try to not push this off too far. |
A workaround for this is to use r.table('test')
.distinct({ index: 'date' })
.map({
group: r.row,
reduction: r.table('test').getAll(r.row, { index: 'date' }).count()
}) @danielmewes noted the only difference between this rewrite and |
Out of curiosity, has this been implemented in 2.4? |
If the table "test" has more than 100k elements, this is going to throw:
Tackling a
ungroup
command at the end is useful if you want to rename some fields for example.Not sure if it's a bug or a proposal. Feel free to tag and move to the appropriate milestone.
The text was updated successfully, but these errors were encountered: