-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support/groupby #893
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
Support/groupby #893
Conversation
|
Review status: 0 of 5 files reviewed at latest revision, 8 unresolved discussions, some commit checks failed. query/groupby.go, line 35 at r2 (raw file):
Move this below GroupInfo. groupResults query/groupby.go, line 39 at r2 (raw file):
make it private. groupResult query/groupby.go, line 40 at r2 (raw file):
keys []groupPair query/groupby.go, line 47 at r2 (raw file):
key types.Val query/groupby.go, line 51 at r2 (raw file):
Move mp and attrs out to a new struct. So, dedup would only have a list of that struct. query/groupby.go, line 191 at r2 (raw file):
grp := res.group[i]. So, you don't need query/groupby.go, line 218 at r2 (raw file):
Remove? query/query.go, line 999 at r1 (raw file):
Make this a struct, with functions to aid what you're trying to achieve here. attrList can be done via this struct. Comments from Reviewable |
|
Review status: 0 of 5 files reviewed at latest revision, 8 unresolved discussions. query/groupby.go, line 35 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 39 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 40 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 47 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 51 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 191 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 218 at r2 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/query.go, line 999 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. Comments from Reviewable |
|
Reviewed 2 of 5 files at r1, 4 of 4 files at r3. query/groupby.go, line 44 at r3 (raw file):
grp.aggregates? here and elsewhere. query/groupby.go, line 50 at r3 (raw file):
return query/groupby.go, line 51 at r3 (raw file):
if query/groupby.go, line 85 at r3 (raw file):
This could be reworded. query/groupby.go, line 100 at r3 (raw file):
Refactor this part in a separate function, which would return query/groupby.go, line 122 at r3 (raw file):
You don't need the idx, just use the uniq instance from above. query/groupby.go, line 125 at r3 (raw file):
Add a comment. query/groupby.go, line 233 at r3 (raw file):
Let's remove any group which has zero results proactively. Comments from Reviewable |
|
Reviewed 2 of 5 files at r1, 4 of 4 files at r3. gql/parser.go, line 1462 at r3 (raw file):
expected a comma or right round ? gql/parser.go, line 1472 at r3 (raw file):
Count is never incremented, so it would be always zero ? query/groupby.go, line 52 at r3 (raw file):
Off the topic, in normal query(without group by) fieldname would be same for both ? Wouldn't that give wrong results if we have both in the query Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 14 unresolved discussions, some commit checks failed. query/query_test.go, line 933 at r3 (raw file):
Does it make sense to group by friend? query/query_test.go, line 941 at r3 (raw file):
There are 5 friends in total, but the output is showing only 2 ?(2 friends * 4 names) Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 15 unresolved discussions, some commit checks failed. query/query_test.go, line 917 at r3 (raw file):
Add a test case with age stored as both int and float may be Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 14 unresolved discussions, some commit checks failed. gql/parser.go, line 1462 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
Done. gql/parser.go, line 1472 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
Done. query/groupby.go, line 44 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 50 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 51 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 52 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
count of the same attribute isn't allowed twice. query/groupby.go, line 85 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 100 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 122 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 125 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/groupby.go, line 233 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. query/query_test.go, line 917 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
This operates on the value query/query_test.go, line 933 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
Just for testing, wouldn't make much sense in reality. query/query_test.go, line 941 at r3 (raw file): Previously, janardhan1993 (Janardhan Reddy) wrote…
yeah, Its friend of the first level friend. Groupby operates on the child predicates of the current level. Comments from Reviewable |
|
Merged to master. |
This change is