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
correct sorting order wrt nulls first/last spec [JIRA: RIAK-3209] #1618
correct sorting order wrt nulls first/last spec [JIRA: RIAK-3209] #1618
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 |
Looks good! 👍✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_DEPS
✅ MAKE_COMPILE
✅ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
create jira issue |
👍 |
1 similar comment
+1 |
Merging and closing this pr |
Successfully merged basho/riak_kv/pulls/1618 (480d180 on to riak_ts-integration-1.5.2) ---
:sha: 80bce7e4736598c3a2d6b6b0e26ab29eb76601e0
:merged: true
:message: Pull Request successfully merged
|
* fix for CREATE TABLE, removing the delta between how the request is serviced between HTTP and PB and RPC. fix for CREATE TABLE, removing the delta between the post-condition of CREATE TABLE (was active bucket-type only) and "query-ready" (is bucket-type active, DDL module compiled and min capability met throughout the ring). * removed wait_until_supported/4 from CREATE TABLE post-condition ensurance b/c the DDL is surely the version supported. * moved create_table unified logic to riak_kv_ts_api instead of riak_kv_ts_util. * (STILL FAILING) added recommended check around the ring of active nodes to ensure the DDL module is compiled as a postcondition of CREATE TABLE. * change to include the node in getting table ready state, including a change to rpc:multicall over sequential rpc:call. * Lock deps for riak_ts-1.5.0 * changed INSERT postcondition check to match the precondition of INSERT, riak_kv_ts_util:is_table_supported/2. * changed retry delay on CREATE TABLE postcondition assurance to 200ms. corrected error formats involving table to be unicode friendly. * Set deps to riak_ts-1.5.1a * added documentation of the table creation flow w/i a general outline for explaining tables and records to distinguish how Riak TS stores these inherently different types of objects. * Unify how CREATE TABLE is serviced and ensure table is query-ready [JIRA: RIAK-3173] (#1577) * fix for CREATE TABLE, removing the delta between how the request is serviced between HTTP and PB and RPC. fix for CREATE TABLE, removing the delta between the post-condition of CREATE TABLE (was active bucket-type only) and "query-ready" (is bucket-type active, DDL module compiled and min capability met throughout the ring). * removed wait_until_supported/4 from CREATE TABLE post-condition ensurance b/c the DDL is surely the version supported. * moved create_table unified logic to riak_kv_ts_api instead of riak_kv_ts_util. * (STILL FAILING) added recommended check around the ring of active nodes to ensure the DDL module is compiled as a postcondition of CREATE TABLE. * change to include the node in getting table ready state, including a change to rpc:multicall over sequential rpc:call. * changed INSERT postcondition check to match the precondition of INSERT, riak_kv_ts_util:is_table_supported/2. * changed retry delay on CREATE TABLE postcondition assurance to 200ms. corrected error formats involving table to be unicode friendly. * Set deps to riak_ts-1.5.1b * Set deps to riak_ts-1.5.1 * Set deps to riak_ts-integration-1.5.2 * qry_buffers: correct sorting order wrt nulls first/last spec (#1618) * qry_buffers: correct sorting order wrt nulls first/last spec * fix projected query size calculation for queries with LIMIT [JIRA: RIAK-3210] (#1619) * qry_worker: fix max query size check w/ LIMIT * qry_worker: more accurate lager message for large query cancellation * properly estimate query size for aggregate queries [JIRA: RIAK-3225] (#1622) * skip estimate_query_size for aggregate qries, properly do for group_by ones * "from the arrival of the second result set" means "< 2" was correct * test estimate_query_size for #state.n_subqueries_done < 2, and >= 2 * simplify estimate_query_size_limit_applies_to_regular_queries_test and add some parens for clarity * don't check projected query size on receipt of last chunk * Merge branch 'riak_ts-integration-1.5.2' into riak_ts-develop-1.5 * Merge branch 'riak_ts-develop-1.5' into jg-factor-down-servicing-create-table-doc * addressed review guidance wrt documentation run ons and the like. * for Riak TS tabular buckets doc: split up run on first sentence. addressed suggestion s/focused/serialized/ for Riak Core Claimant purpose in the CREATE TABLE flow. addressed suggestion s/labeled/implemented as/ for whether to be EC or SC. * changed base branch.
This fixes the ordering logic of ORDER BY for columns with nulls, to conform to the SQL Standard (https://drive.google.com/file/d/0B-2H_9GJ40JpMDAwY0VyWjkwSWc, page 617). Specifically, a column with nulls will be sorted as follows:
ASC NULLS LAST yields
1, 2, 3, null, null
ASC NULLS FIRST yields
null, null, 1, 2, 3
DESC NULLS LAST yields
null, null, 3, 2, 1
DESC NULLS FIRST yields
3, 2, 1, null, null
Note that the test was also updated to reflect this change: basho/riak_test@c595fe7.