예제 #1
0
파일: IntReader.java 프로젝트: epsilon/tajo
 @Override
 public Datum read(ByteBuffer buffer) throws IOException {
   if (buffer.hasRemaining()) {
     return DatumFactory.createInt(buffer.getInt());
   } else {
     return null;
   }
 }
예제 #2
0
 @Override
 public Datum terminate(FunctionContext ctx) {
   return DatumFactory.createInt(((MinContext) ctx).min);
 }
예제 #3
0
 @Override
 public Datum getPartialResult(FunctionContext ctx) {
   return DatumFactory.createInt(((MinContext) ctx).min);
 }
예제 #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);
 }