Search in sources :

Example 1 with PigTest

use of org.apache.pig.pigunit.PigTest in project calcite by apache.

the class PigRelBuilderStyleTest method assertScriptAndResults.

private void assertScriptAndResults(String relAliasForStore, String script, String expectedScript, String[] expectedResults) {
    try {
        assertEquals(expectedScript, script);
        script = script + "\nSTORE " + relAliasForStore + " INTO 'myoutput';";
        PigTest pigTest = new PigTest(script.split("[\\r\\n]+"));
        pigTest.assertOutputAnyOrder(expectedResults);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : PigTest(org.apache.pig.pigunit.PigTest)

Aggregations

PigTest (org.apache.pig.pigunit.PigTest)1