Package org.apache.tajo.datum

Examples of org.apache.tajo.datum.Int8Datum


  @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));
    assertEquals(0, c.get(Calendar.HOUR_OF_DAY));
    assertEquals(0, c.get(Calendar.MINUTE));
View Full Code Here

TOP

Related Classes of org.apache.tajo.datum.Int8Datum

Copyright © 2018 www.massapicom. 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.