Kouhei Sutou
null+****@clear*****
Fri Jun 22 16:37:19 JST 2018
Kouhei Sutou 2018-06-22 16:37:19 +0900 (Fri, 22 Jun 2018) New Revision: d6c8f4c56dfad0e1c1b0b050bcdf6fc901796341 https://github.com/groonga/groonga/commit/d6c8f4c56dfad0e1c1b0b050bcdf6fc901796341 Message: window_sum: support dynamic column as a target column Modified files: lib/window_functions.c Modified: lib/window_functions.c (+5 -3) =================================================================== --- lib/window_functions.c 2018-06-22 16:28:24 +0900 (1812f2922) +++ lib/window_functions.c 2018-06-22 16:37:19 +0900 (bfcec66d0) @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2016-2017 Brazil + Copyright(C) 2016-2018 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -60,14 +60,16 @@ window_sum(grn_ctx *ctx, } target = args[0]; - if (target->header.type != GRN_ACCESSOR) { + if (!(grn_obj_is_scalar_column(ctx, target) || + grn_obj_is_accessor(ctx, target))) { grn_obj inspected; GRN_TEXT_INIT(&inspected, 0); grn_inspect(ctx, &inspected, target); GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, "window_sum(): " - "the target column must be accessor: <%.*s>", + "the target column must be " + "scalar column or accessor: <%.*s>", (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected)); GRN_OBJ_FIN(ctx, &inspected); -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180622/6569fc89/attachment-0001.htm