Skip to content

Commit

Permalink
Optimize expression for !=, <, <=, => and > operations
Browse files Browse the repository at this point in the history
Cast is done in building expression not evaluating expression.
  • Loading branch information
kou committed Nov 11, 2014
1 parent 0e131e2 commit dbf3149
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,11 @@ grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj, grn_operator op,
DFI_PUT(e, type, domain, code);
break;
case GRN_OP_EQUAL :
case GRN_OP_NOT_EQUAL :
case GRN_OP_LESS :
case GRN_OP_GREATER :
case GRN_OP_LESS_EQUAL :
case GRN_OP_GREATER_EQUAL :
PUSH_CODE(e, op, obj, nargs, code);
if (nargs) {
grn_id xd, yd = GRN_ID_NIL;
Expand Down Expand Up @@ -889,11 +894,6 @@ grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj, grn_operator op,
case GRN_OP_SIMILAR :
case GRN_OP_PREFIX :
case GRN_OP_SUFFIX :
case GRN_OP_NOT_EQUAL :
case GRN_OP_LESS :
case GRN_OP_GREATER :
case GRN_OP_LESS_EQUAL :
case GRN_OP_GREATER_EQUAL :
case GRN_OP_GEO_DISTANCE1 :
case GRN_OP_GEO_DISTANCE2 :
case GRN_OP_GEO_DISTANCE3 :
Expand Down

0 comments on commit dbf3149

Please sign in to comment.