Package org.apache.pig.builtin

Examples of org.apache.pig.builtin.INDEXOF


        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);
       
        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);
       
        strFunc = new UPPER();
View Full Code Here


        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);
       
        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);
       
        strFunc = new UPPER();
View Full Code Here

        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);
       
        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);
       
        strFunc = new UPPER();
View Full Code Here

        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);

        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);

        strFunc = new UPPER();
View Full Code Here

        assertEquals("Testing SUBSTIRNG, endindex < 0", null, stringSubstr_.exec(testTuple));
    }

    @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");
        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

        assertEquals("uppercase string", "abc", stringSubstr_.exec(testTuple));
    }

    @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");
        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

        assertEquals("Testing SUBSTIRNG, endindex < 0", null, stringSubstr_.exec(testTuple));
    }

    @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");
        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

        assertEquals("Testing SUBSTIRNG, endindex < 0", null, stringSubstr_.exec(testTuple));
    }

    @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");
        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

        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);

        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);

        strFunc = new UPPER();
View Full Code Here

        intFunc = new LAST_INDEX_OF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==7);

        intFunc = new INDEXOF();
        input = TupleFactory.getInstance().newTuple(l);
        intOutput = intFunc.exec(input);
        assertTrue(intOutput.intValue()==4);

        strFunc = new UPPER();
View Full Code Here

TOP

Related Classes of org.apache.pig.builtin.INDEXOF

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.