Search in sources :

Example 1 with ExplodeFunctor

use of com.yahoo.bullet.querying.tablefunctors.ExplodeFunctor in project bullet-core by yahoo.

the class ExplodeTest method testExplodeTableFunction.

@Test
public void testExplodeTableFunction() {
    Explode tableFunction = new Explode(new FieldExpression("abc"), "foo", "bar", true);
    Assert.assertEquals(tableFunction.getType(), TableFunctionType.EXPLODE);
    Assert.assertEquals(tableFunction.getField(), new FieldExpression("abc"));
    Assert.assertEquals(tableFunction.getKeyAlias(), "foo");
    Assert.assertEquals(tableFunction.getValueAlias(), "bar");
    Assert.assertTrue(tableFunction.isOuter());
    Assert.assertTrue(tableFunction.getTableFunctor() instanceof ExplodeFunctor);
}
Also used : ExplodeFunctor(com.yahoo.bullet.querying.tablefunctors.ExplodeFunctor) FieldExpression(com.yahoo.bullet.query.expressions.FieldExpression) Test(org.testng.annotations.Test)

Aggregations

FieldExpression (com.yahoo.bullet.query.expressions.FieldExpression)1 ExplodeFunctor (com.yahoo.bullet.querying.tablefunctors.ExplodeFunctor)1 Test (org.testng.annotations.Test)1