@Override public Datum read(ByteBuffer buffer) throws IOException { if (buffer.hasRemaining()) { return DatumFactory.createInt(buffer.getInt()); } else { return null; } }
@Override public Datum terminate(FunctionContext ctx) { return DatumFactory.createInt(((MinContext) ctx).min); }
@Override public Datum getPartialResult(FunctionContext ctx) { return DatumFactory.createInt(((MinContext) ctx).min); }
@Test public void testTarget() throws CloneNotSupportedException { QueryBlock.Target t1 = new QueryBlock.Target(new ConstEval(DatumFactory.createInt(5)), 0); QueryBlock.Target t2 = (QueryBlock.Target) t1.clone(); assertEquals(t1, t2); }