Package org.apache.pig

Examples of org.apache.pig.SortColInfo


            }
            ProjectExpression project = (ProjectExpression) opsList.get(0);
            int sortColIndex = project.getColNum();
            String sortColName = (schema == null) ? null :
                schema.getField(sortColIndex).alias;
            sortColInfoList.add(new SortColInfo(sortColName, sortColIndex,
                    mAscCols.get(i)? SortColInfo.Order.ASCENDING :
                        SortColInfo.Order.DESCENDING));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here


            }
            LOProject project = (LOProject) opsList.get(0);
            int sortColIndex = project.getCol();
            String sortColName = (schema == null) ? null :
                schema.getField(sortColIndex).alias;
            sortColInfoList.add(new SortColInfo(sortColName, sortColIndex,
                    mAscCols.get(i)? SortColInfo.Order.ASCENDING :
                        SortColInfo.Order.DESCENDING));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

   
    private SortInfo getSortInfo(List<String> colNames, List<Integer> colIndices,
            List<SortColInfo.Order> orderingTypes) {
        List<SortColInfo> sortColInfoList = new ArrayList<SortColInfo>();
        for(int i = 0; i < colNames.size(); i++) {
            sortColInfoList.add(new SortColInfo(colNames.get(i),
                    colIndices.get(i), orderingTypes.get(i)));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

                                new Schema.FieldSchema("t0",
                                        TypeCheckingTestUtil.genFlatSchema(
                                                aliases,types),
                                                DataType.TUPLE)), DataType.BAG));
        List<SortColInfo> colList = new ArrayList<SortColInfo>();
        SortColInfo col1 = new SortColInfo("f1", 0, SortColInfo.Order.ASCENDING);
        SortColInfo col2 = new SortColInfo("f1", 1, SortColInfo.Order.DESCENDING);
        colList.add(col1);
        colList.add(col2);
        SortInfo sortInfo = new SortInfo(colList);
                       
        ResourceSchema rsSchema = new ResourceSchema(origSchema, sortInfo);
View Full Code Here

                                new Schema.FieldSchema("t0",
                                        TypeCheckingTestUtil.genFlatSchema(
                                                aliases,types),
                                                DataType.TUPLE)), DataType.BAG));
        List<SortColInfo> colList = new ArrayList<SortColInfo>();
        SortColInfo col1 = new SortColInfo("f1", 0, SortColInfo.Order.ASCENDING);
        SortColInfo col2 = new SortColInfo("f1", 1, SortColInfo.Order.DESCENDING);
        colList.add(col1);
        colList.add(col2);
        SortInfo sortInfo = new SortInfo(colList);
                       
        ResourceSchema rsSchema = new ResourceSchema(origSchema, sortInfo);
View Full Code Here

   
    private SortInfo getSortInfo(List<String> colNames, List<Integer> colIndices,
            List<SortColInfo.Order> orderingTypes) {
        List<SortColInfo> sortColInfoList = new ArrayList<SortColInfo>();
        for(int i = 0; i < colNames.size(); i++) {
            sortColInfoList.add(new SortColInfo(colNames.get(i),
                    colIndices.get(i), orderingTypes.get(i)));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

            }
            LOProject project = (LOProject) opsList.get(0);
            int sortColIndex = project.getCol();
            String sortColName = (schema == null) ? null :
                schema.getField(sortColIndex).alias;
            sortColInfoList.add(new SortColInfo(sortColName, sortColIndex,
                    mAscCols.get(i)? SortColInfo.Order.ASCENDING :
                        SortColInfo.Order.DESCENDING));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

   
    private SortInfo getSortInfo(List<String> colNames, List<Integer> colIndices,
            List<SortColInfo.Order> orderingTypes) {
        List<SortColInfo> sortColInfoList = new ArrayList<SortColInfo>();
        for(int i = 0; i < colNames.size(); i++) {
            sortColInfoList.add(new SortColInfo(colNames.get(i),
                    colIndices.get(i), orderingTypes.get(i)));
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

                    return new SortInfo(sortColInfoList);
                }
                //expand the project-range into multiple SortColInfos
                for(int cnum = project.getStartCol(); cnum < project.getEndCol(); cnum++){
                    sortColInfoList.add(
                            new SortColInfo(null, cnum, getOrder(mAscCols,i))
                    );
                }
            }
            else{
                int sortColIndex = project.getColNum();
                String sortColName = (schema == null) ? null :
                    schema.getField(sortColIndex).alias;

                sortColInfoList.add(
                        new SortColInfo(sortColName, sortColIndex, getOrder(mAscCols,i))
                );
            }
        }
        return new SortInfo(sortColInfoList);
    }
View Full Code Here

                                new Schema.FieldSchema("t0",
                                        TypeCheckingTestUtil.genFlatSchema(
                                                aliases,types),
                                                DataType.TUPLE)), DataType.BAG));
        List<SortColInfo> colList = new ArrayList<SortColInfo>();
        SortColInfo col1 = new SortColInfo("f1", 0, SortColInfo.Order.ASCENDING);
        SortColInfo col2 = new SortColInfo("f1", 1, SortColInfo.Order.DESCENDING);
        colList.add(col1);
        colList.add(col2);
        SortInfo sortInfo = new SortInfo(colList);
                       
        ResourceSchema rsSchema = new ResourceSchema(origSchema, sortInfo);
View Full Code Here

TOP

Related Classes of org.apache.pig.SortColInfo

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.