Package org.apache.pig.newplan.logical.relational

Examples of org.apache.pig.newplan.logical.relational.LogicalSchema.addField()


           
            // C = join
            LogicalSchema cschema = new LogicalSchema();
            cschema.addField(new LogicalSchema.LogicalFieldSchema(
                "x", null, DataType.INTEGER));
            cschema.addField(new LogicalSchema.LogicalFieldSchema(
                "y", null, DataType.INTEGER));
            LogicalExpressionPlan aprojplan = new LogicalExpressionPlan();
            new ProjectExpression(aprojplan, 0, 0, null);
            LogicalExpressionPlan bprojplan = new LogicalExpressionPlan();
            new ProjectExpression(bprojplan, 1, 0, null);
View Full Code Here


    @Test
    public void testLoadEqualityDifferentFuncSpecCtorArgs() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
       
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
View Full Code Here

    @Test
    public void testLoadEqualityDifferentNumFuncSpecCstorArgs() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
       
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
View Full Code Here

    @Test
    public void testLoadEqualityDifferentFunctionNames() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
       
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
View Full Code Here

   
    @Test
    public void testLoadEqualityDifferentFileName() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
   
View Full Code Here

   
    @Test
    public void testRelationalEqualityDifferentSchema() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
View Full Code Here

            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
        // Different schema
        LogicalSchema aschema2 = new LogicalSchema();
        aschema2.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.CHARARRAY));
       
        LOLoad load6 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "z"})), aschema2, lp, null);
        lp.add(load6);
View Full Code Here

   
    @Test
    public void testRelationalEqualityOneNullOneNotNullSchema() throws FrontendException {
        LogicalPlan lp = new LogicalPlan();
        LogicalSchema aschema1 = new LogicalSchema();
        aschema1.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        LOLoad load1 = new LOLoad(new FileSpec("/abc",
            new FuncSpec(DummyLoad.class.getName(), new String[] {"x", "y"})), aschema1, lp, null);
        lp.add(load1);
       
View Full Code Here

        ConstantExpression fc1 = new ConstantExpression(fp1,
            new Integer(0), new LogicalFieldSchema(null, null, DataType.INTEGER));
        new EqualExpression(fp1, fy1, fc1);
        LOFilter D1 = new LOFilter(lp, fp1);
        LogicalSchema cschema = new LogicalSchema();
        cschema.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        cschema.addField(new LogicalSchema.LogicalFieldSchema(
            "y", null, DataType.INTEGER));
        D1.neverUseForRealSetSchema(cschema);
        lp.add(D1);
View Full Code Here

        new EqualExpression(fp1, fy1, fc1);
        LOFilter D1 = new LOFilter(lp, fp1);
        LogicalSchema cschema = new LogicalSchema();
        cschema.addField(new LogicalSchema.LogicalFieldSchema(
            "x", null, DataType.INTEGER));
        cschema.addField(new LogicalSchema.LogicalFieldSchema(
            "y", null, DataType.INTEGER));
        D1.neverUseForRealSetSchema(cschema);
        lp.add(D1);
       
        LogicalExpressionPlan fp2 = new LogicalExpressionPlan();
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.