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

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDFLpad


import junit.framework.TestCase;

public class TestGenericUDFRpad extends TestCase {

  public void testLpad() throws HiveException {
    GenericUDFLpad udf = new GenericUDFLpad();
    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);
  }
View Full Code Here


import junit.framework.TestCase;

public class TestGenericUDFLpad extends TestCase {

  public void testLpad() throws HiveException {
    GenericUDFLpad udf = new GenericUDFLpad();
    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);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.udf.generic.GenericUDFLpad

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.