Package org.apache.tajo.engine.function.builtin

Examples of org.apache.tajo.engine.function.builtin.Date.eval()


  @Test
  public void testDate() {
    Date date = new Date();
    Tuple tuple = new VTuple(new Datum[] {new TextDatum("25/12/2012 00:00:00")});
    Int8Datum unixtime = (Int8Datum) date.eval(tuple);
    Calendar c = Calendar.getInstance();
    c.setTimeInMillis(unixtime.asInt8());
    assertEquals(2012, c.get(Calendar.YEAR));
    assertEquals(11, c.get(Calendar.MONTH));
    assertEquals(25, c.get(Calendar.DAY_OF_MONTH));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.