-
Notifications
You must be signed in to change notification settings - Fork 234
inverse distribution functions (PERCENTILE_{DISC,CONT}, MEDIAN, MODE) #1624
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
Conversation
|
Thanks @hmmr! Settings---
minimum_reviewers: 2
merge: true
build_steps:
- make clean
- make deps
- make compile
- make test
- make xref
- make dialyzer
org_mode: true
timeout: 1800 |
There seems to be an issue with build step **make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
✅ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
48c073c to
0b60938
Compare
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
|
0b60938 to
876fb98
Compare
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
with fixes for static expression evaluation in function parameters
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
| {reply, {ok, {ColNames, ColTypes, Rows}}, State9} | ||
| end. | ||
|
|
||
| maybe_supply_offset([]) -> [0]; |
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.
Thing isn't a great variable name
src/riak_kv_app.erl
Outdated
| [true, false], | ||
| false), | ||
|
|
||
| riak_core_capability:register({riak_kv, inverse_distrib_functions_supported}, |
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 is redundant - there is no upgrade downgrade...
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.
Removed in 82b99c8.
|
Review of the unit tests in |
src/riak_kv_qry_compiler.erl
Outdated
| %% possible other such columns and converted to the actual function in | ||
| %% `compile_order_by`. | ||
| prepare_invdist_funcall(FnName, [{identifier, [ColumnArg]}|_] = Args) -> | ||
| case riak_core_capability:get({riak_kv, inverse_distrib_functions_supported}) of |
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.
Here is the rogue capability call
90fb2cc to
bd497b8
Compare
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
There seems to be an issue with build step **merge,make_compile,make_test,make_xref,make_dialyzer** ! ☁️⛔ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
⛔ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
# Conflicts: # src/riak_kv_qry_compiler.erl
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
|
+1 |
There seems to be an issue with build step **merge,make_compile,make_test,make_xref,make_dialyzer** ! ☁️⛔ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
⛔ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
becb69d to
0bd882b
Compare
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
# Conflicts: # src/riak_kv_qry_compiler.erl
0bd882b to
ac22721
Compare
There seems to be an issue with build step **make_test,make_xref,make_dialyzer** ! ☁️✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
⛔ MAKE_TEST
⛔ MAKE_XREF
⛔ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
src/riak_kv_qry_compiler.erl
Outdated
| %% we allow multiple PERCENTILE calls in a single SELECT, | ||
| %% but they all must have the same column argument | ||
| case lists:usort(CompiledOrderBys) of | ||
| [_SameColumndOrderBy] -> |
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.
Nit, but it might be important to understand the case clause: there's an apparently-extraneous d in the binding name, _SameColumndOrderBy
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.
fixed in b094470.
src/riak_kv_qry_compiler.erl
Outdated
| %% convert successfully validated invdist funcalls (a list of them, | ||
| %% to allow for percentile(x, 0.42), percentile(y, 0.24)) into a list | ||
| %% of ORDER BYs, LIMITs and OFFSETs; or report validation errors if any. | ||
| compile_inverdist_funcalls_to_orderby(InvDistFuns) -> |
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.
Since we only report the first error anyway, and since a map would be easier to read than a fold, is there any reason we can't use a map with a throw on error?
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.
Reduced the foldl into two elegant list comprehensions in b094470.
|
|
👍 |
|
thumbot retry |
Looks good! 👍✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
✅ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 1 of 2 Code reviews from organization basho
|
|
+1 |
✅ 2 of 2 Code reviews from organization basho
|
|
Merging and closing this pr |
|
Successfully merged basho/riak_kv/pulls/1624 (b094470 on to riak_ts-develop) ---
:sha: 11ac6663cf59635f4392a997c55f03eaa9e25651
:merged: true
:message: Pull Request successfully merged
|
RTS-545, RTS-1165 (MEDIAN); RTS-1173, RTS-1553 (PERCENTILE); RTS-547, RTS-1222 (MODE)
RFC in basho/rfc#55. Depends on basho/riak_ql#167. Tests in basho/riak_test#1270.
Support for inverse distribution functions, currently including PERCENTILE_DISC, PERCENTILE_CONT, MEDIAN and MODE.
Additionally, a fix for a div-by-zero hiccup that happens when the first chunk received by the coordinator has zero rows.