Navigation Menu

Skip to content

Commit

Permalink
sub_filter: use grn_expr_get_var() intead of grn->impl->curr_expr
Browse files Browse the repository at this point in the history
There are no tests for this case because this case isn't used with the
current query executor. We should add a test for this case after we
get a better query executor.
  • Loading branch information
kou committed Jun 21, 2013
1 parent bc2e633 commit 4d6b086
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/proc.c
Expand Up @@ -3943,8 +3943,6 @@ static grn_obj *
func_sub_filter(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
{
grn_obj *found;
grn_obj *command = ctx->impl->curr_expr;
grn_obj *condition_ptr = NULL;
grn_obj *condition = NULL;
grn_obj *variable;
grn_obj *table = NULL;
Expand All @@ -3956,14 +3954,7 @@ func_sub_filter(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_dat
}
GRN_BOOL_SET(ctx, found, GRN_FALSE);

condition_ptr = grn_expr_get_var(ctx, command,
GRN_SELECT_INTERNAL_VAR_CONDITION,
strlen(GRN_SELECT_INTERNAL_VAR_CONDITION));
if (!condition_ptr) {
goto exit;
}

condition = GRN_PTR_VALUE(condition_ptr);
grn_proc_get_info(ctx, user_data, NULL, NULL, &condition);
if (!condition) {
goto exit;
}
Expand Down

0 comments on commit 4d6b086

Please sign in to comment.