Kouhei Sutou
null+****@clear*****
Fri May 20 17:36:42 JST 2016
Kouhei Sutou 2016-05-20 17:36:42 +0900 (Fri, 20 May 2016) New Revision: 6f09e45487a9f7c65722669dd798ac2a2ffe1773 https://github.com/groonga/groonga/commit/6f09e45487a9f7c65722669dd798ac2a2ffe1773 Message: select: extract code for --match_columns, --query and --filter Modified files: lib/proc/proc_select.c test/command/suite/select/filter/alias/nested.expected test/command/suite/select/filter/alias/one_level.expected test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_latitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_longitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_longitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_latitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_longitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_longitude.expected test/command/suite/select/filter/invalid/binary_operation/vector.expected test/command/suite/select/filter/invalid/function_call/temporary_table.expected test/command/suite/select/filter/invalid/function_call/with_argument.expected test/command/suite/select/filter/invalid/function_call/with_complex_argument.expected test/command/suite/select/filter/invalid/function_call/with_complex_arguments.expected test/command/suite/select/filter/invalid/function_call/without_argument.expected test/command/suite/select/filter/invalid/match/argument/column.expected test/command/suite/select/filter/invalid/match/no_index/overflow.expected test/command/suite/select/filter/near/no_index.expected test/command/suite/select/function/between/with_index/cast/max_error.expected test/command/suite/select/function/between/with_index/cast/min_error.expected test/command/suite/select/function/sub_filter/no_index.expected test/command/suite/select/match_columns/invalid/table.expected test/command/suite/select/query/invalid/leading_not.expected test/command/suite/select/query/invalid/missing_close_parenthesis.expected Modified: lib/proc/proc_select.c (+165 -125) =================================================================== --- lib/proc/proc_select.c 2016-05-20 17:09:43 +0900 (efb03a8) +++ lib/proc/proc_select.c 2016-05-20 17:36:42 +0900 (b0fdb7c) @@ -127,6 +127,8 @@ typedef struct { grn_obj *match_columns; grn_obj *expression; } condition; + uint16_t cacheable; + uint16_t taintable; } grn_select_data; grn_rc @@ -1045,6 +1047,152 @@ grn_select_apply_initial_columns(grn_ctx *ctx, } static grn_bool +grn_select_filter(grn_ctx *ctx, + grn_select_data *data) +{ + grn_obj *v; + + if (data->query.length == 0 && data->filter.length == 0) { + data->tables.result = data->tables.initial; + return TRUE; + } + + GRN_EXPR_CREATE_FOR_QUERY(ctx, + data->tables.initial, + data->condition.expression, + v); + if (!data->condition.expression) { + ERR(GRN_NO_MEMORY_AVAILABLE, + "[select][condition] " + "failed to create expression for condition: %s", + ctx->errbuf); + return GRN_FALSE; + } + + if (data->match_columns.length > 0) { + GRN_EXPR_CREATE_FOR_QUERY(ctx, + data->tables.initial, + data->condition.match_columns, + v); + if (!data->condition.match_columns) { + ERR(GRN_NO_MEMORY_AVAILABLE, + "[select][match_columns] " + "failed to create expression for match columns: <%.*s>: %s", + (int)(data->match_columns.length), + data->match_columns.value, + ctx->errbuf); + return GRN_FALSE; + } + + grn_expr_parse(ctx, + data->condition.match_columns, + data->match_columns.value, + data->match_columns.length, + NULL, GRN_OP_MATCH, GRN_OP_AND, + GRN_EXPR_SYNTAX_SCRIPT); + if (ctx->rc) { + return GRN_FALSE; + } + } + + if (data->query.length > 0) { + grn_expr_flags flags; + grn_obj query_expander_buf; + const char *query = data->query.value; + unsigned int query_len = data->query.length; + + flags = GRN_EXPR_SYNTAX_QUERY; + if (data->query_flags.length) { + flags |= grn_parse_query_flags(ctx, + data->query_flags.value, + data->query_flags.length); + if (ctx->rc) { + return GRN_FALSE; + } + } else { + flags |= GRN_EXPR_ALLOW_PRAGMA|GRN_EXPR_ALLOW_COLUMN; + } + + GRN_TEXT_INIT(&query_expander_buf, 0); + if (data->query_expander.length > 0) { + grn_rc rc; + rc = grn_proc_syntax_expand_query(ctx, + data->query.value, + data->query.length, + flags, + data->query_expander.value, + data->query_expander.length, + &query_expander_buf); + if (rc == GRN_SUCCESS) { + query = GRN_TEXT_VALUE(&query_expander_buf); + query_len = GRN_TEXT_LEN(&query_expander_buf); + } else { + GRN_OBJ_FIN(ctx, &query_expander_buf); + return GRN_FALSE; + } + } + + grn_expr_parse(ctx, + data->condition.expression, + query, + query_len, + data->condition.match_columns, + GRN_OP_MATCH, + GRN_OP_AND, + flags); + GRN_OBJ_FIN(ctx, &query_expander_buf); + + if (ctx->rc != GRN_SUCCESS) { + return GRN_FALSE; + } + } + + if (data->filter.length > 0) { + grn_expr_parse(ctx, + data->condition.expression, + data->filter.value, + data->filter.length, + data->condition.match_columns, + GRN_OP_MATCH, + GRN_OP_AND, + GRN_EXPR_SYNTAX_SCRIPT); + if (ctx->rc != GRN_SUCCESS) { + return GRN_FALSE; + } + + if (data->query.length > 0) { + grn_expr_append_op(ctx, data->condition.expression, GRN_OP_AND, 2); + } + + if (ctx->rc != GRN_SUCCESS) { + return GRN_FALSE; + } + } + + data->cacheable *= ((grn_expr *)(data->condition.expression))->cacheable; + data->taintable += ((grn_expr *)(data->condition.expression))->taintable; + /* + grn_obj strbuf; + GRN_TEXT_INIT(&strbuf, 0); + grn_expr_inspect(ctx, &strbuf, cond); + GRN_TEXT_PUTC(ctx, &strbuf, '\0'); + GRN_LOG(ctx, GRN_LOG_NOTICE, "query=(%s)", GRN_TEXT_VALUE(&strbuf)); + GRN_OBJ_FIN(ctx, &strbuf); + */ + if (ctx->rc != GRN_SUCCESS) { + return GRN_FALSE; + } + + data->tables.result = grn_table_select(ctx, + data->tables.initial, + data->condition.expression, + NULL, + GRN_OP_OR); + + return ctx->rc == GRN_SUCCESS; +} + +static grn_bool grn_select_slice_execute(grn_ctx *ctx, grn_select_data *data, grn_obj *table, @@ -1749,7 +1897,6 @@ static grn_rc grn_select(grn_ctx *ctx, grn_select_data *data) { uint32_t nkeys, nhits; - uint16_t cacheable = 1, taintable = 0; grn_table_sort_key *keys; grn_obj *outbuf = ctx->impl->output.buf; grn_content_type output_type = ctx->impl->output.type; @@ -1765,6 +1912,9 @@ grn_select(grn_ctx *ctx, grn_select_data *data) data->condition.match_columns = NULL; data->condition.expression = NULL; + data->cacheable = 1; + data->taintable = 0; + { const char *query_end = data->query.value + data->query.length; int space_len; @@ -1936,7 +2086,9 @@ grn_select(grn_ctx *ctx, grn_select_data *data) data->output_columns.length, data->offset, data->limit); - if (!ctx->rc && cacheable && cache_key_size <= GRN_CACHE_MAX_KEY_SIZE && + if (!ctx->rc && + data->cacheable > 0 && + cache_key_size <= GRN_CACHE_MAX_KEY_SIZE && (!data->cache.value || data->cache.length != 2 || data->cache.value[0] != 'n' || @@ -1948,124 +2100,10 @@ grn_select(grn_ctx *ctx, grn_select_data *data) data->tables.initial = data->tables.target; grn_select_apply_initial_columns(ctx, data); - - if (data->query.length > 0 || data->filter.length > 0) { - grn_obj *v; - GRN_EXPR_CREATE_FOR_QUERY(ctx, - data->tables.initial, - data->condition.expression, - v); - if (data->condition.expression) { - if (data->match_columns.length) { - GRN_EXPR_CREATE_FOR_QUERY(ctx, - data->tables.initial, - data->condition.match_columns, - v); - if (data->condition.match_columns) { - grn_expr_parse(ctx, - data->condition.match_columns, - data->match_columns.value, - data->match_columns.length, - NULL, GRN_OP_MATCH, GRN_OP_AND, - GRN_EXPR_SYNTAX_SCRIPT); - if (ctx->rc) { - goto exit; - } - } else { - /* todo */ - } - } - if (data->query.length > 0) { - grn_expr_flags flags; - grn_obj query_expander_buf; - const char *query = data->query.value; - unsigned int query_len = data->query.length; - - flags = GRN_EXPR_SYNTAX_QUERY; - if (data->query_flags.length) { - flags |= grn_parse_query_flags(ctx, - data->query_flags.value, - data->query_flags.length); - if (ctx->rc) { - goto exit; - } - } else { - flags |= GRN_EXPR_ALLOW_PRAGMA|GRN_EXPR_ALLOW_COLUMN; - } - GRN_TEXT_INIT(&query_expander_buf, 0); - if (data->query_expander.length) { - grn_rc rc; - rc = grn_proc_syntax_expand_query(ctx, - data->query.value, - data->query.length, - flags, - data->query_expander.value, - data->query_expander.length, - &query_expander_buf); - if (rc == GRN_SUCCESS) { - query = GRN_TEXT_VALUE(&query_expander_buf); - query_len = GRN_TEXT_LEN(&query_expander_buf); - } else { - GRN_OBJ_FIN(ctx, &query_expander_buf); - goto exit; - } - } - grn_expr_parse(ctx, - data->condition.expression, - query, - query_len, - data->condition.match_columns, - GRN_OP_MATCH, - GRN_OP_AND, - flags); - GRN_OBJ_FIN(ctx, &query_expander_buf); - if (!ctx->rc && data->filter.length > 0) { - grn_expr_parse(ctx, - data->condition.expression, - data->filter.value, - data->filter.length, - data->condition.match_columns, - GRN_OP_MATCH, - GRN_OP_AND, - GRN_EXPR_SYNTAX_SCRIPT); - if (!ctx->rc) { - grn_expr_append_op(ctx, data->condition.expression, GRN_OP_AND, 2); - } - } - } else { - grn_expr_parse(ctx, - data->condition.expression, - data->filter.value, - data->filter.length, - data->condition.match_columns, - GRN_OP_MATCH, - GRN_OP_AND, - GRN_EXPR_SYNTAX_SCRIPT); - } - cacheable *= ((grn_expr *)(data->condition.expression))->cacheable; - taintable += ((grn_expr *)(data->condition.expression))->taintable; - /* - grn_obj strbuf; - GRN_TEXT_INIT(&strbuf, 0); - grn_expr_inspect(ctx, &strbuf, cond); - GRN_TEXT_PUTC(ctx, &strbuf, '\0'); - GRN_LOG(ctx, GRN_LOG_NOTICE, "query=(%s)", GRN_TEXT_VALUE(&strbuf)); - GRN_OBJ_FIN(ctx, &strbuf); - */ - if (!ctx->rc) { - data->tables.result = grn_table_select(ctx, - data->tables.initial, - data->condition.expression, - NULL, - GRN_OP_OR); - } - } else { - /* todo */ - ERRCLR(ctx); - } - } else { - data->tables.result = data->tables.initial; + if (!grn_select_filter(ctx, data)) { + goto exit; } + if (data->tables.result) { nhits = grn_table_size(ctx, data->tables.result); } else { @@ -2151,8 +2189,8 @@ grn_select(grn_ctx *ctx, grn_select_data *data) grn_obj_unlink(ctx, adjuster); goto exit; } - cacheable *= ((grn_expr *)adjuster)->cacheable; - taintable += ((grn_expr *)adjuster)->taintable; + data->cacheable *= ((grn_expr *)adjuster)->cacheable; + data->taintable += ((grn_expr *)adjuster)->taintable; grn_select_apply_adjuster(ctx, data->tables.result, adjuster); grn_obj_unlink(ctx, adjuster); } @@ -2169,8 +2207,8 @@ grn_select(grn_ctx *ctx, grn_select_data *data) data->scorer.value, data->scorer.length, NULL, GRN_OP_MATCH, GRN_OP_AND, GRN_EXPR_SYNTAX_SCRIPT|GRN_EXPR_ALLOW_UPDATE); - cacheable *= ((grn_expr *)scorer)->cacheable; - taintable += ((grn_expr *)scorer)->taintable; + data->cacheable *= ((grn_expr *)scorer)->cacheable; + data->taintable += ((grn_expr *)scorer)->taintable; GRN_TABLE_EACH_BEGIN(ctx, data->tables.result, cursor, id) { GRN_RECORD_SET(ctx, v, id); grn_expr_exec(ctx, scorer, 0); @@ -2248,14 +2286,16 @@ grn_select(grn_ctx *ctx, grn_select_data *data) GRN_OUTPUT_ARRAY_OPEN("RESULT", 0); } GRN_OUTPUT_ARRAY_CLOSE(); - if (!ctx->rc && cacheable && cache_key_size <= GRN_CACHE_MAX_KEY_SIZE && + if (!ctx->rc && + data->cacheable && + cache_key_size <= GRN_CACHE_MAX_KEY_SIZE && (!data->cache.value || data->cache.length != 2 || data->cache.value[0] != 'n' || data->cache.value[1] != 'o')) { grn_cache_update(ctx, cache_obj, cache_key, cache_key_size, outbuf); } - if (taintable) { + if (data->taintable > 0) { grn_db_touch(ctx, DB_OBJ(data->tables.target)->db); } } Modified: test/command/suite/select/filter/alias/nested.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/alias/nested.expected 2016-05-20 17:09:43 +0900 (82ff97d) +++ test/command/suite/select/filter/alias/nested.expected 2016-05-20 17:36:42 +0900 (1c95de9) @@ -14,7 +14,7 @@ load --table Memos ] [[0,0.0,0.0],1] select Memos --filter 'caption == "Groonga"' -[[[-63,0.0,0.0],"Syntax error: <caption| |== \"Groonga\">"],[]] +[[[-63,0.0,0.0],"Syntax error: <caption| |== \"Groonga\">"]] #|e| Syntax error: <caption| |== "Groonga"> load --table Aliases [ Modified: test/command/suite/select/filter/alias/one_level.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/alias/one_level.expected 2016-05-20 17:09:43 +0900 (adb084a) +++ test/command/suite/select/filter/alias/one_level.expected 2016-05-20 17:36:42 +0900 (71ef69c) @@ -14,7 +14,7 @@ load --table Memos ] [[0,0.0,0.0],1] select Memos --filter 'caption == "Groonga"' -[[[-63,0.0,0.0],"Syntax error: <caption| |== \"Groonga\">"],[]] +[[[-63,0.0,0.0],"Syntax error: <caption| |== \"Groonga\">"]] #|e| Syntax error: <caption| |== "Groonga"> load --table Aliases [ Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_latitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_latitude.expected 2016-05-20 17:09:43 +0900 (50371d4) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_latitude.expected 2016-05-20 17:36:42 +0900 (42d9c4c) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x0", "90.0x0")' 0.0 ], "geo_in_rectangle(): bottom right point's latitude is too big: <324000000>(max:324000000): (0,0) (324000000,0)" - ], - [ - ] ] #|e| geo_in_rectangle(): bottom right point's latitude is too big: <324000000>(max:324000000): (0,0) (324000000,0) Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_longitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_longitude.expected 2016-05-20 17:09:43 +0900 (9ffa5e4) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_max_longitude.expected 2016-05-20 17:36:42 +0900 (be39ac0) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x0", "0x180.0")' 0.0 ], "geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x180.0>" - ], - [ - ] ] #|e| geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x180.0> Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected 2016-05-20 17:09:43 +0900 (4088172) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected 2016-05-20 17:36:42 +0900 (861342e) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x0", "-90.0x0")' 0.0 ], "geo_in_rectangle(): bottom right point's latitude is too small: <-324000000>(min:-324000000): (0,0) (-324000000,0)" - ], - [ - ] ] #|e| geo_in_rectangle(): bottom right point's latitude is too small: <-324000000>(min:-324000000): (0,0) (-324000000,0) Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_longitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_longitude.expected 2016-05-20 17:09:43 +0900 (50f52c0) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_longitude.expected 2016-05-20 17:36:42 +0900 (d34e2aa) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x0", "0x-180.0")' 0.0 ], "geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x-180.0>" - ], - [ - ] ] #|e| geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x-180.0> Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_latitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_latitude.expected 2016-05-20 17:09:43 +0900 (7a6eae9) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_latitude.expected 2016-05-20 17:36:42 +0900 (3e9c2c3) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "90.0x0", "0x0")' 0.0 ], "geo_in_rectangle(): top left point's latitude is too big: <324000000>(max:324000000): (324000000,0) (0,0)" - ], - [ - ] ] #|e| geo_in_rectangle(): top left point's latitude is too big: <324000000>(max:324000000): (324000000,0) (0,0) Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_longitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_longitude.expected 2016-05-20 17:09:43 +0900 (bd9efa7) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_max_longitude.expected 2016-05-20 17:36:42 +0900 (e96e0a5) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x180.0", "0x0")' 0.0 ], "geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x180.0>" - ], - [ - ] ] #|e| geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x180.0> Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected 2016-05-20 17:09:43 +0900 (e3f7f5d) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected 2016-05-20 17:36:42 +0900 (0b22195) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "-90.0x0", "0x0")' 0.0 ], "geo_in_rectangle(): top left point's latitude is too small: <-324000000>(min:-324000000): (-324000000,0) (0,0)" - ], - [ - ] ] #|e| geo_in_rectangle(): top left point's latitude is too small: <-324000000>(min:-324000000): (-324000000,0) (0,0) Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_longitude.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_longitude.expected 2016-05-20 17:09:43 +0900 (b85131a) +++ test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_longitude.expected 2016-05-20 17:36:42 +0900 (73931e1) @@ -7,9 +7,6 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x-180.0", "0x0")' 0.0 ], "geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x-180.0>" - ], - [ - ] ] #|e| geo_in_rectangle(): failed to cast to WGS84GeoPoint: <0x-180.0> Modified: test/command/suite/select/filter/invalid/binary_operation/vector.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/invalid/binary_operation/vector.expected 2016-05-20 17:09:43 +0900 (445c174) +++ test/command/suite/select/filter/invalid/binary_operation/vector.expected 2016-05-20 17:36:42 +0900 (f2d7c42) @@ -23,9 +23,6 @@ select Memos --filter 'tags + "groonga"' --output_columns _key,_score 0.0 ], "<+> doesn't support vector: <[{\"value\":\"groonga\", \"weight\":0}]> + <\"groonga\">" - ], - [ - ] ] #|e| <+> doesn't support vector: <[{"value":"groonga", "weight":0}]> + <"groonga"> Modified: test/command/suite/select/filter/invalid/function_call/temporary_table.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/invalid/function_call/temporary_table.expected 2016-05-20 17:09:43 +0900 (01395c7) +++ test/command/suite/select/filter/invalid/function_call/temporary_table.expected 2016-05-20 17:36:42 +0900 (b2c7d9f) @@ -7,9 +7,6 @@ select Shops --output_columns 'name' --limit 0 --filter 'geo_in_rectangle( 0.0 ], "geo_in_rectangle(): failed to cast to WGS84GeoPoint: <90.0x180.0>" - ], - [ - ] ] #|e| geo_in_rectangle(): failed to cast to WGS84GeoPoint: <90.0x180.0> Modified: test/command/suite/select/filter/invalid/function_call/with_argument.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/invalid/function_call/with_argument.expected 2016-05-20 17:09:43 +0900 (198a951) +++ test/command/suite/select/filter/invalid/function_call/with_argument.expected 2016-05-20 17:36:42 +0900 (108d988) @@ -1,5 +1,5 @@ table_create Users TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] select Users --filter '"invalid function"("alice")' -[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"],[]] +[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"]] #|e| invalid function: <"invalid function"> Modified: test/command/suite/select/filter/invalid/function_call/with_complex_argument.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/invalid/function_call/with_complex_argument.expected 2016-05-20 17:09:43 +0900 (8ea8136) +++ test/command/suite/select/filter/invalid/function_call/with_complex_argument.expected 2016-05-20 17:36:42 +0900 (f9c0382) @@ -1,5 +1,5 @@ table_create Users TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] select Users --filter '"invalid function"(_key == "alice" || _key == "bob")' -[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"],[]] +[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"]] #|e| invalid function: <"invalid function"> Modified: test/command/suite/select/filter/invalid/function_call/with_complex_arguments.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/invalid/function_call/with_complex_arguments.expected 2016-05-20 17:09:43 +0900 (89ce15e) +++ test/command/suite/select/filter/invalid/function_call/with_complex_arguments.expected 2016-05-20 17:36:42 +0900 (02d015e) @@ -1,5 +1,5 @@ table_create Users TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] select Users --filter '"invalid function"(_key == "alice" || _key == "bob", _key == "chris" && _id == 1)' -[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"],[]] +[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"]] #|e| invalid function: <"invalid function"> Modified: test/command/suite/select/filter/invalid/function_call/without_argument.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/invalid/function_call/without_argument.expected 2016-05-20 17:09:43 +0900 (bc63f5e) +++ test/command/suite/select/filter/invalid/function_call/without_argument.expected 2016-05-20 17:36:42 +0900 (ce4d133) @@ -1,5 +1,5 @@ table_create Users TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] select Users --filter '"invalid function"()' -[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"],[]] +[[[-22,0.0,0.0],"invalid function: <\"invalid function\">"]] #|e| invalid function: <"invalid function"> Modified: test/command/suite/select/filter/invalid/match/argument/column.expected (+0 -3) =================================================================== --- test/command/suite/select/filter/invalid/match/argument/column.expected 2016-05-20 17:09:43 +0900 (b5c26ee) +++ test/command/suite/select/filter/invalid/match/argument/column.expected 2016-05-20 17:36:42 +0900 (06b4ef0) @@ -22,9 +22,6 @@ select Sites --filter "_key @ uri" 0.0 ], "invalid expression: can't use column as a value: <Sites.uri>: <#<expr\n vars:{\n $1:#<record:hash:Sites id:(no value)>\n },\n " - ], - [ - ] ] #|e| invalid expression: can't use column as a value: <Sites.uri>: <#<expr Modified: test/command/suite/select/filter/invalid/match/no_index/overflow.expected (+1 -13) =================================================================== --- test/command/suite/select/filter/invalid/match/no_index/overflow.expected 2016-05-20 17:09:43 +0900 (f45d8f6) +++ test/command/suite/select/filter/invalid/match/no_index/overflow.expected 2016-05-20 17:36:42 +0900 (eecc95c) @@ -519,17 +519,5 @@ load --table Users ] [[0,0.0,0.0],512] select Users --filter 'name @ "a" || (1 | "invalid operator causes overflow")' -[ - [ - [ - -22, - 0.0, - 0.0 - ], - "not a numerical format: <invalid operator causes overflow>" - ], - [ - - ] -] +[[[-22,0.0,0.0],"not a numerical format: <invalid operator causes overflow>"]] #|e| not a numerical format: <invalid operator causes overflow> Modified: test/command/suite/select/filter/near/no_index.expected (+1 -1) =================================================================== --- test/command/suite/select/filter/near/no_index.expected 2016-05-20 17:09:43 +0900 (47022bc) +++ test/command/suite/select/filter/near/no_index.expected 2016-05-20 17:36:42 +0900 (e1bc6af) @@ -13,5 +13,5 @@ load --table Entries ] [[0,0.0,0.0],6] select Entries --filter 'content *N "I fast"' --output_columns '_score, content' -[[[-38,0.0,0.0],"not implemented operator assigned"],[]] +[[[-38,0.0,0.0],"not implemented operator assigned"]] #|e| not implemented operator assigned Modified: test/command/suite/select/function/between/with_index/cast/max_error.expected (+1 -1) =================================================================== --- test/command/suite/select/function/between/with_index/cast/max_error.expected 2016-05-20 17:09:43 +0900 (e08d202) +++ test/command/suite/select/function/between/with_index/cast/max_error.expected 2016-05-20 17:36:42 +0900 (02783a4) @@ -16,5 +16,5 @@ load --table Users ] [[0,0.0,0.0],5] select Users --filter 'between(age, 18, "include", "XXX", "include")' -[[[-22,0.0,0.0],"between(): failed to cast max: <\"XXX\"> -> <Int32>"],[]] +[[[-22,0.0,0.0],"between(): failed to cast max: <\"XXX\"> -> <Int32>"]] #|e| between(): failed to cast max: <"XXX"> -> <Int32> Modified: test/command/suite/select/function/between/with_index/cast/min_error.expected (+1 -1) =================================================================== --- test/command/suite/select/function/between/with_index/cast/min_error.expected 2016-05-20 17:09:43 +0900 (a56c9e3) +++ test/command/suite/select/function/between/with_index/cast/min_error.expected 2016-05-20 17:36:42 +0900 (73397c1) @@ -16,5 +16,5 @@ load --table Users ] [[0,0.0,0.0],5] select Users --filter 'between(age, "XXX", "include", 20, "include")' -[[[-22,0.0,0.0],"between(): failed to cast min: <\"XXX\"> -> <Int32>"],[]] +[[[-22,0.0,0.0],"between(): failed to cast min: <\"XXX\"> -> <Int32>"]] #|e| between(): failed to cast min: <"XXX"> -> <Int32> Modified: test/command/suite/select/function/sub_filter/no_index.expected (+1 -1) =================================================================== --- test/command/suite/select/function/sub_filter/no_index.expected 2016-05-20 17:09:43 +0900 (189d1d2) +++ test/command/suite/select/function/sub_filter/no_index.expected 2016-05-20 17:36:42 +0900 (2d96276) @@ -41,5 +41,5 @@ load --table Packages ] [[0,0.0,0.0],3] select Packages --filter 'sub_filter(files.author, "birthday >= \\"1988-01-04 00:00:00\\" && birthday < \\"1992-02-09 00:00:00\\"")' --output_columns '_key, files, files.author.birthday' -[[[-38,0.0,0.0],"selector only proc can't be called: <sub_filter>"],[]] +[[[-38,0.0,0.0],"selector only proc can't be called: <sub_filter>"]] #|e| selector only proc can't be called: <sub_filter> Modified: test/command/suite/select/match_columns/invalid/table.expected (+1 -1) =================================================================== --- test/command/suite/select/match_columns/invalid/table.expected 2016-05-20 17:09:43 +0900 (d87714f) +++ test/command/suite/select/match_columns/invalid/table.expected 2016-05-20 17:36:42 +0900 (3e318a8) @@ -13,5 +13,5 @@ load --table Memos ] [[0,0.0,0.0],1] select Memos --match_columns Memos --query Groonga -[[[-22,0.0,0.0],"invalid match target: <Memos>"],[]] +[[[-22,0.0,0.0],"invalid match target: <Memos>"]] #|e| invalid match target: <Memos> Modified: test/command/suite/select/query/invalid/leading_not.expected (+1 -1) =================================================================== --- test/command/suite/select/query/invalid/leading_not.expected 2016-05-20 17:09:43 +0900 (f1aa896) +++ test/command/suite/select/query/invalid/leading_not.expected 2016-05-20 17:36:42 +0900 (479b436) @@ -21,5 +21,5 @@ load --table Entries ] [[0,0.0,0.0],5] select Entries --match_columns content --query '-fast' -[[[-63,0.0,0.0],"Syntax error: <|-|fast>"],[]] +[[[-63,0.0,0.0],"Syntax error: <|-|fast>"]] #|e| Syntax error: <|-|fast> Modified: test/command/suite/select/query/invalid/missing_close_parenthesis.expected (+1 -1) =================================================================== --- test/command/suite/select/query/invalid/missing_close_parenthesis.expected 2016-05-20 17:09:43 +0900 (883af45) +++ test/command/suite/select/query/invalid/missing_close_parenthesis.expected 2016-05-20 17:36:42 +0900 (e7dc07c) @@ -21,5 +21,5 @@ load --table Entries ] [[0,0.0,0.0],5] select Entries --match_columns content --query '(star' -[[[-63,0.0,0.0],"Syntax error: <(star||>"],[]] +[[[-63,0.0,0.0],"Syntax error: <(star||>"]] #|e| Syntax error: <(star||> -------------- next part -------------- HTML����������������������������...下载