예제 #1
0
 private int hashProjectedRow(Row row) {
   int hash = 0;
   for (int f = 0; f < fieldEvals.size(); f++) {
     TEvaluatableExpression fieldEval = fieldEvals.get(f);
     hash = hash ^ expressionAdapter.hash(storeAdapter, fieldEval, row, collator(f));
   }
   return hash;
 }
예제 #2
0
 public FilterBindingsCursor(
     QueryContext context,
     Cursor input,
     int bindingPosition,
     int depth,
     List<? extends TPreparedExpression> expressions,
     ExpressionAdapter<TPreparedExpression, TEvaluatableExpression> expressionAdapter) {
   super(input, bindingPosition, depth);
   this.storeAdapter = context.getStore();
   this.expressionAdapter = expressionAdapter;
   for (TPreparedExpression field : expressions) {
     TEvaluatableExpression eval = expressionAdapter.evaluate(field, context);
     fieldEvals.add(eval);
   }
 }
예제 #3
0
 <EXPR> Execution(
     QueryContext context,
     QueryBindingsCursor bindingsCursor,
     List<? extends EXPR> expressions,
     ExpressionAdapter<EXPR, E> adapter) {
   super(context);
   this.inputCursor = input.cursor(context, bindingsCursor);
   this.onPositiveBindingsCursor = new SingletonQueryBindingsCursor(null);
   this.onPositiveCursor = onPositive.cursor(context, onPositiveBindingsCursor);
   this.adapter = adapter;
   for (EXPR field : expressions) {
     E eval = adapter.evaluate(field, context);
     fieldEvals.add(eval);
   }
 }