Exemple #1
0
 @Override
 public Datum read(ByteBuffer buffer) throws IOException {
   if (buffer.hasRemaining()) {
     return DatumFactory.createInt(buffer.getInt());
   } else {
     return null;
   }
 }
Exemple #2
0
 @Override
 public Datum terminate(FunctionContext ctx) {
   return DatumFactory.createInt(((MinContext) ctx).min);
 }
Exemple #3
0
 @Override
 public Datum getPartialResult(FunctionContext ctx) {
   return DatumFactory.createInt(((MinContext) ctx).min);
 }
Exemple #4
0
 @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);
 }