Package org.apache.pig.builtin

Examples of org.apache.pig.builtin.INDEXOF.exec()


    @Test
    public void testIndexOf() throws IOException {
        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
View Full Code Here


        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
View Full Code Here

       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
        assertEquals( ((Integer) "xyz".indexOf("abc")), indexOf.exec(testTuple));
    }
   
View Full Code Here

       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
        assertEquals( ((Integer) "xyz".indexOf("abc")), indexOf.exec(testTuple));
    }
   
    @Test
    public void testLastIndexOf() throws IOException {
        LAST_INDEX_OF lastIndexOf = new LAST_INDEX_OF();
View Full Code Here

    @Test
    public void testIndexOf() throws IOException {
        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
View Full Code Here

        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
View Full Code Here

       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
        assertEquals( ((Integer) "xyz".indexOf("abc")), indexOf.exec(testTuple));
    }
   
View Full Code Here

       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
        assertEquals( ((Integer) "xyz".indexOf("abc")), indexOf.exec(testTuple));
    }
   
    @Test
    public void testLastIndexOf() throws IOException {
        LAST_INDEX_OF lastIndexOf = new LAST_INDEX_OF();
View Full Code Here

    @Test
    public void testIndexOf() throws IOException {
        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
View Full Code Here

        INDEXOF indexOf = new INDEXOF();
        Tuple testTuple = Util.buildTuple("xyz", "");
        assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple(null, null);
        assertNull(indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "y");
        assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
       
        testTuple = Util.buildTuple("xyz", "abc");
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.