Kouhei Sutou 2019-04-25 18:10:01 +0900 (Thu, 25 Apr 2019) Revision: cda3eae150430c765ba37330ff2d37b5f3c45e58 https://github.com/groonga/groonga/commit/cda3eae150430c765ba37330ff2d37b5f3c45e58 Message: all_records: fix a bug that all records are always matched with AND Modified files: lib/proc.c test/command/suite/select/function/in_values/with_index/reference/and_optimized.expected test/command/suite/select/function/in_values/with_index/reference/and_optimized.test Modified: lib/proc.c (+1 -1) =================================================================== --- lib/proc.c 2019-04-25 17:51:50 +0900 (3ce11d68f) +++ lib/proc.c 2019-04-25 18:10:01 +0900 (542e127b0) @@ -1859,7 +1859,7 @@ selector_all_records(grn_ctx *ctx, grn_obj *table, grn_obj *index, memset(&posting, 0, sizeof(grn_posting)); GRN_TABLE_EACH(ctx, table, 0, 0, id, NULL, NULL, NULL, { posting.rid = id; - grn_ii_posting_add(ctx, &posting, (grn_hash *)res, GRN_OP_OR); + grn_ii_posting_add(ctx, &posting, (grn_hash *)res, op); }); return ctx->rc; Modified: test/command/suite/select/function/in_values/with_index/reference/and_optimized.expected (+3 -1) =================================================================== --- test/command/suite/select/function/in_values/with_index/reference/and_optimized.expected 2019-04-25 17:51:50 +0900 (97dfec7e0) +++ test/command/suite/select/function/in_values/with_index/reference/and_optimized.expected 2019-04-25 18:10:01 +0900 (2d58c024f) @@ -1,3 +1,5 @@ +plugin_register ruby/eval +[[0,0.0,0.0],true] table_create Tags TABLE_PAT_KEY ShortText [[0,0.0,0.0],true] table_create Memos TABLE_HASH_KEY ShortText @@ -57,8 +59,8 @@ select Memos --output_columns _key,tag --filter 'all_records() && (tag == "g ] ] #>select --filter "all_records() && (tag == \"groonga\" || tag == \"mroonga\" || tag == \"droonga\")" --output_columns "_key,tag" --sortby "_id" --table "Memos" -#:000000000000000 filter(5): all_records() #:000000000000000 filter(4): in_values(Memos.tag, #<record:pat:Tags id:1 key:"groonga">, #<record:pat:Tags id:2 key:"mroonga">, #<record:pat:Tags id:4 key:"droonga">) +#:000000000000000 filter(4): all_records() #:000000000000000 select(4) #:000000000000000 sort(4) #:000000000000000 output(4) Modified: test/command/suite/select/function/in_values/with_index/reference/and_optimized.test (+3 -0) =================================================================== --- test/command/suite/select/function/in_values/with_index/reference/and_optimized.test 2019-04-25 17:51:50 +0900 (7b822933a) +++ test/command/suite/select/function/in_values/with_index/reference/and_optimized.test 2019-04-25 18:10:01 +0900 (daee246f9) @@ -1,4 +1,7 @@ #$GRN_EXPR_OPTIMIZE=yes +#@on-error omit +plugin_register ruby/eval +#@on-error default table_create Tags TABLE_PAT_KEY ShortText -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190425/e4daa498/attachment-0001.html>