Examples of TimestampWritable


Examples of org.apache.hadoop.hive.serde2.io.TimestampWritable

    GenericUDFDate udf = new GenericUDFDate();
    ObjectInspector valueOI = PrimitiveObjectInspectorFactory.writableTimestampObjectInspector;
    ObjectInspector[] arguments = {valueOI};

    udf.initialize(arguments);
    DeferredObject valueObj = new DeferredJavaObject(new TimestampWritable(new Timestamp(109, 06,
        30, 4, 17, 52, 0)));
    DeferredObject[] args = {valueObj};
    Text output = (Text) udf.evaluate(args);

    assertEquals("to_date() test for TIMESTAMP failed ", "2009-07-30", output.toString());
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.