Skip to content

Commit

Permalink
Make it a record
Browse files Browse the repository at this point in the history
  • Loading branch information
nik9000 committed Oct 25, 2023
1 parent 437fc08 commit 0615cc8
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,9 @@ public static BatchEncoder batchEncoder(Block.Ref ref, int batchSize, boolean al
}
}

private static class EvaluatorFactory implements ExpressionEvaluator.Factory {
private final ExpressionEvaluator.Factory field;
private final BiFunction<BlockFactory, Block.Ref, Block.Ref> dedupe;

protected EvaluatorFactory(ExpressionEvaluator.Factory field, BiFunction<BlockFactory, Block.Ref, Block.Ref> dedupe) {
this.field = field;
this.dedupe = dedupe;
}

private record EvaluatorFactory(ExpressionEvaluator.Factory field, BiFunction<BlockFactory, Block.Ref, Block.Ref> dedupe)
implements
ExpressionEvaluator.Factory {
@Override
public ExpressionEvaluator get(DriverContext context) {
return new Evaluator(context.blockFactory(), field.get(context), dedupe);
Expand Down

0 comments on commit 0615cc8

Please sign in to comment.