Package org.apache.pig.builtin

Examples of org.apache.pig.builtin.STARTSWITH


        assertEquals("bar:baz", splits.get(1));
    }

    @Test
    public void testStartsWith() throws IOException {
        STARTSWITH startsWith = new STARTSWITH();
        Tuple testTuple1 = Util.buildTuple("foo", "bar");
        assertFalse("String prefix should not match", startsWith.exec(testTuple1));
        Tuple testTuple2 = Util.buildTuple("foobaz", "foo");
        assertTrue("String prefix should match", startsWith.exec(testTuple2));
    }
View Full Code Here


        assertEquals("bar:baz", splits.get(1));
    }

    @Test
    public void testStartsWith() throws IOException {
        STARTSWITH startsWith = new STARTSWITH();
        Tuple testTuple1 = Util.buildTuple("foo", "bar");
        assertFalse("String prefix should not match", startsWith.exec(testTuple1));
        Tuple testTuple2 = Util.buildTuple("foobaz", "foo");
        assertTrue("String prefix should match", startsWith.exec(testTuple2));
    }
View Full Code Here

        assertEquals("Wrong Schema checks", null, outputBag);
    }

    @Test
    public void testStartsWith() throws IOException {
        STARTSWITH startsWith = new STARTSWITH();
        Tuple testTuple1 = Util.buildTuple("foo", "bar");
        assertFalse("String prefix should not match", startsWith.exec(testTuple1));
        Tuple testTuple2 = Util.buildTuple("foobaz", "foo");
        assertTrue("String prefix should match", startsWith.exec(testTuple2));
    }
View Full Code Here

TOP

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

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.