Package org.apache.hadoop.hive.ql.udf.generic

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDFLTrim.initialize()


  public void testTrim() throws HiveException {
    GenericUDFLTrim udf = new GenericUDFLTrim();
    ObjectInspector valueOI = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    ObjectInspector[] arguments = { valueOI };

    udf.initialize(arguments);
    runAndVerify(" Hello World! ", "Hello World! ", udf);
    runAndVerify("Hello World! ", "Hello World! ", udf);
    runAndVerify(" Hello World!", "Hello World!", udf);
    runAndVerify("Hello World!", "Hello World!", udf);
    runAndVerify("   ", "", udf);
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.