Package org.apache.pig.builtin

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


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


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

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

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

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

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

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

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

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

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