本文整理汇总了Java中org.apache.pig.newplan.logical.relational.LogicalPlan.size方法的典型用法代码示例。如果您正苦于以下问题:Java LogicalPlan.size方法的具体用法?Java LogicalPlan.size怎么用?Java LogicalPlan.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.pig.newplan.logical.relational.LogicalPlan
的用法示例。
在下文中一共展示了LogicalPlan.size方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test1
import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test1() throws FrontendException {
String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " +
"B = load 'y' as ( u:int, v:int, z:long); " +
"C = union onschema A, B; " +
"D = store C into 'output';";
LogicalPlan plan = generateLogicalPlan( query );
if( plan != null ) {
int nodeCount = plan.size();
UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
visitor.visit();
System.out.println( "Plan after setter: " + plan.toString() );
Assert.assertEquals( nodeCount + 2, plan.size() );
}
}
示例2: test2
import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test2() throws FrontendException {
String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " +
"B = load 'y' as ( u:int, v:int, w:bytearray); " +
"C = union onschema A, B; " +
"D = store C into 'output';";
LogicalPlan plan = generateLogicalPlan( query );
if( plan != null ) {
int nc = plan.size();
UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
visitor.visit();
System.out.println( "Plan after setter: " + plan.toString() );
Assert.assertEquals( nc + 1, plan.size() );
}
}
示例3: test3
import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test3() throws FrontendException {
String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " +
"B = load 'y' as ( u:int, v:long, w:bytearray); " +
"C = union onschema A, B; " +
"D = store C into 'output';";
LogicalPlan plan = generateLogicalPlan( query );
if( plan != null ) {
int nc = plan.size();
UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
visitor.visit();
System.out.println( "Plan after setter: " + plan.toString() );
Assert.assertEquals( nc, plan.size() );
}
}
示例4: testMergeCompatibleSchema
import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void testMergeCompatibleSchema() throws FrontendException {
String query = "A = load 'x' as ( u:int, v:long, w:int); " +
"B = load 'y' as ( u:int, v:long, w:long); " +
"C = union onschema A, B; " +
"D = store C into 'output';";
LogicalPlan plan = generateLogicalPlan( query );
if( plan != null ) {
int nc = plan.size();
UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
visitor.visit();
System.out.println( "Plan after setter: " + plan.toString() );
Assert.assertEquals( nc+1, plan.size() ); // ForEach inserted before union
}
}