Package org.apache.pig.impl.plan

Examples of org.apache.pig.impl.plan.ProjectionMap


            return mProjectionMap;
        }
       
        if(Schema.equals(inputSchema, outputSchema, false, true)) {
            //there is a one is to one mapping between input and output schemas
            mProjectionMap = new ProjectionMap(false);
            return mProjectionMap;
        } else {
            //problem - input and output schemas for a distinct have to match!
            mProjectionMap = null;
            return mProjectionMap;
View Full Code Here


        if(inputSchema == null) {
            if(outputSchema != null) {
                //determine schema returned null and the user specified a schema
                //OR
                //the predecessor did not have a schema and the user specified a schema
                mProjectionMap = new ProjectionMap(false);
                return mProjectionMap;
            }
        }
       
        if(Schema.equals(inputSchema, outputSchema, false, true)) {
            //there is a one is to one mapping between input and output schemas
            mProjectionMap = new ProjectionMap(false);
            return mProjectionMap;
        } else {
            MultiMap<Integer, ProjectionMap.Column> mapFields = new MultiMap<Integer, ProjectionMap.Column>();
            //compute the mapping assuming its a prefix projection
            for(int i = 0; i < inputSchema.size(); ++i) {
                mapFields.put(i, new ProjectionMap.Column(new Pair<Integer, Integer>(0, i)));
            }
           
            mProjectionMap = new ProjectionMap(mapFields, null, null);
            return mProjectionMap;
        }
    }
View Full Code Here

                    removedFields.add(new Pair<Integer, Integer>(0, i));
                }
            }
        }

        mProjectionMap = new ProjectionMap(mapFields, removedFields, addedFields);
        return mProjectionMap;
    }
View Full Code Here

       
        if(addedFields.size() == 0) {
            addedFields = null;
        }

        mProjectionMap = new ProjectionMap(mapFields, null, addedFields);
        return mProjectionMap;
    }
View Full Code Here

            return mProjectionMap;
        }
       
        if(Schema.equals(inputSchema, outputSchema, false, true)) {
            //there is a one is to one mapping between input and output schemas
            mProjectionMap = new ProjectionMap(false);
            return mProjectionMap;
        } else {
            //problem - input and output schemas for a filter have to match!
            mProjectionMap = null;
            return mProjectionMap;
View Full Code Here

        }
       
       
        if(Schema.equals(inputSchema, outputSchema, false, true)) {
            //there is a one is to one mapping between input and output schemas
            mProjectionMap = new ProjectionMap(false);
            return mProjectionMap;
        } else {
            //problem - input and output schemas for a store have to match!
            mProjectionMap = null;
            return mProjectionMap;
View Full Code Here

            //add all the elements of the input schema to the removed fields
            for(int i = 0; i < inputSchema.size(); ++i) {
                removedFields.add(new Pair<Integer, Integer>(0, i));
            }
        }
        mProjectionMap = new ProjectionMap(null, (removedFields.size() == 0? null: removedFields), addedFields);
        return mProjectionMap;
    }
View Full Code Here

            return mProjectionMap;
        }
*/       
        if(Schema.equals(inputSchema, outputSchema, false, true)) {
            //there is a one is to one mapping between input and output schemas
            mProjectionMap = new ProjectionMap(false);
            return mProjectionMap;
        } else {
            //problem - input and output schemas for a split output have to match!
            mProjectionMap = null;
            return mProjectionMap;
View Full Code Here

                    mapFields.put(inputColumn, new ProjectionMap.Column(new Pair<Integer, Integer>(inputNum, inputColumn)));
                }
            }
        }
       
        mProjectionMap = new ProjectionMap(mapFields, null, null);
        return mProjectionMap;
    }
View Full Code Here

       
        if(removedFields.size() == 0) {
            removedFields = null;
        }

        mProjectionMap = new ProjectionMap(mapFields, removedFields, addedFields);
        return mProjectionMap;
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.impl.plan.ProjectionMap

Copyright © 2018 www.massapicom. 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.