Package org.apache.pig.builtin

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


   
    @Test
    public void testTrim() throws IOException {
        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces    ");
        assertEquals("spaces     ".trim(), trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
View Full Code Here


        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces    ");
        assertEquals("spaces     ".trim(), trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
        assertNull(trim.exec(testTuple));
    }
   
View Full Code Here

       
        testTuple = Util.buildTuple("spaces    ");
        assertEquals("spaces     ".trim(), trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
        assertNull(trim.exec(testTuple));
    }
   
    @Test
    public void testSplit() throws IOException {
        STRSPLIT splitter = new STRSPLIT();
View Full Code Here

   
    @Test
    public void testTrim() throws IOException {
        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces right    ");
        assertEquals("spaces right", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces left");
View Full Code Here

        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces right    ");
        assertEquals("spaces right", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces left");
        assertEquals("spaces left", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces both    ");
View Full Code Here

       
        testTuple = Util.buildTuple("spaces right    ");
        assertEquals("spaces right", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces left");
        assertEquals("spaces left", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces both    ");
        assertEquals("spaces both", trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
View Full Code Here

       
        testTuple = Util.buildTuple("    spaces left");
        assertEquals("spaces left", trim.exec(testTuple));
       
        testTuple = Util.buildTuple("    spaces both    ");
        assertEquals("spaces both", trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
        assertNull(trim.exec(testTuple));
    }
View Full Code Here

       
        testTuple = Util.buildTuple("    spaces both    ");
        assertEquals("spaces both", trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
        assertNull(trim.exec(testTuple));
    }

    @Test
    public void testLtrim() throws IOException {
        LTRIM trim = new LTRIM();
View Full Code Here

   
    @Test
    public void testTrim() throws IOException {
        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces    ");
        assertEquals("spaces     ".trim(), trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
View Full Code Here

        TRIM trim = new TRIM();
        Tuple testTuple = Util.buildTuple("nospaces");
        assertEquals("nospaces".trim(), trim.exec(testTuple));
       
        testTuple = Util.buildTuple("spaces    ");
        assertEquals("spaces     ".trim(), trim.exec(testTuple));
       
        testTuple = TupleFactory.getInstance().newTuple();
        assertNull(trim.exec(testTuple));
    }
   
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.