-
Notifications
You must be signed in to change notification settings - Fork 323
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
Table: grouping #1392
Table: grouping #1392
Conversation
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.
@@ -262,10 +262,118 @@ type Column | |||
fields = Map.singleton "name" (Json.String name) . insert "data" storage_json | |||
Json.Object fields | |||
|
|||
## Efficiently joins two tables based on either the index or a key column. |
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.
## Efficiently joins two tables based on either the index or a key column. | |
## Efficiently joins two tables based on either the index or the specified key column. |
`other` with matching indexes. If the index in `other` is not unique, | ||
the corresponding rows of `this` will be duplicated in the result. |
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.
This sentence seems a bit unclear to me. Maybe it would be clearer with something like: "If the column corresponding to this' index in other
is not unique..."?
- function: the function used for value aggregation. Values belonging | ||
to each grouped are passed to this function in a vector. |
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.
This sentence doesn't make sense. Do you mean "belonging to each group"?
mean : Text -> Column | ||
mean name_suffix='_mean' = | ||
vec_mean v = if v.length == 0 then Nothing else | ||
(Vector.Vector v).reduce (+) / v.length | ||
r = this.java_column.aggregate ['mean', name_suffix, vec_mean, True] | ||
Column r |
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.
Probably worth adding mode
and median
as fast operations alongside mean
.
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.
One day :P
|
||
Arguments: | ||
- show_rows: the number of initial rows that should be displayed. | ||
print show_rows=10 = this.values.print show_rows |
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.
Missing type signature.
Object _this, Object src, long source_index, Array that, long dest_index, long count) { | ||
Builtins builtins = lookupContextReference(Language.class).get().getBuiltins(); | ||
throw new PanicException( | ||
builtins.error().typeError().newInstance(builtins.mutable().array().newInstance(), src), |
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.
Use makeTypeError
.
Pull Request Description
Introduces grouping to tables
Important Notes
Checklist
Please include the following checklist in your PR: