Kouhei Sutou
null+****@clear*****
Tue Sep 11 14:30:45 JST 2018
Kouhei Sutou 2018-09-11 14:30:45 +0900 (Tue, 11 Sep 2018) Revision: 901bcb47250933b853fe2d4c5ab95761b64f5ece https://github.com/groonga/groonga/commit/901bcb47250933b853fe2d4c5ab95761b64f5ece Message: Support "boolean * numeric + boolean" Modified files: lib/expr_executor.c Modified: lib/expr_executor.c (+10 -2) =================================================================== --- lib/expr_executor.c 2018-09-11 14:29:14 +0900 (94ada8ac9) +++ lib/expr_executor.c 2018-09-11 14:30:45 +0900 (a2160df7f) @@ -539,7 +539,11 @@ grn_expr_executor_init_general(grn_ctx *ctx, goto exit; \ } \ if (y != res) { \ - res->header.domain = x->header.domain; \ + if (x->header.domain == GRN_DB_BOOL) { \ + res->header.domain = GRN_DB_UINT8; \ + } else { \ + res->header.domain = x->header.domain; \ + } \ } \ ARITHMETIC_OPERATION_DISPATCH(x, y, res, \ integer8_operation, \ @@ -552,7 +556,11 @@ grn_expr_executor_init_general(grn_ctx *ctx, text_operation, \ invalid_type_error); \ if (y == res) { \ - res->header.domain = x->header.domain; \ + if (x->header.domain == GRN_DB_BOOL) { \ + res->header.domain = GRN_DB_UINT8; \ + } else { \ + res->header.domain = x->header.domain; \ + } \ } \ } while (0) -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180911/3bdbce1a/attachment.htm