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

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


    ObjectInspector valueOI1 = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    ObjectInspector valueOI2 = PrimitiveObjectInspectorFactory.writableIntObjectInspector;
    ObjectInspector valueOI3 = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    ObjectInspector[] arguments = { valueOI1, valueOI2, valueOI3 };

    udf.initialize(arguments);
    runAndVerify("hi", 5, "??", "???hi", udf);
    runAndVerify("hi", 1, "??", "h", udf);
  }

  private void runAndVerify(String str, int len, String pad, String expResult, GenericUDF udf)
View Full Code Here


    ObjectInspector valueOI1 = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    ObjectInspector valueOI2 = PrimitiveObjectInspectorFactory.writableIntObjectInspector;
    ObjectInspector valueOI3 = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    ObjectInspector[] arguments = { valueOI1, valueOI2, valueOI3 };

    udf.initialize(arguments);
    runAndVerify("hi", 5, "??", "???hi", udf);
    runAndVerify("hi", 1, "??", "h", udf);
  }

  private void runAndVerify(String str, int len, String pad, String expResult, GenericUDF 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.