Examples of asInt8()


Examples of org.apache.tajo.datum.Int8Datum.asInt8()

  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
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.