Package org.apache.pig.newplan.logical.visitor

Examples of org.apache.pig.newplan.logical.visitor.ColumnAliasConversionVisitor


            + "c = cogroup a by *, b by *;"
            + "d = foreach c generate group, flatten($1), flatten($2);"
            + "e = foreach d generate group + 1, field1 + 1, field4 + 2.0;";

            LogicalPlan plan = generateLogicalPlan(query);
            new ColumnAliasConversionVisitor( plan ).visit();
            // validate
            CompilationMessageCollector collector = new CompilationMessageCollector();
            try {
                TypeCheckingRelVisitor typeChecker = new TypeCheckingRelVisitor(plan, collector);
                typeChecker.visit();
View Full Code Here


            checkWarning(query, CAST_LOAD_NOT_FOUND);
        }

        private void checkWarning(String query, String warnMsg) throws FrontendException {
            LogicalPlan plan = generateLogicalPlan(query);
            new ColumnAliasConversionVisitor( plan ).visit();
            // validate
            CompilationMessageCollector collector = new CompilationMessageCollector();
            TypeCheckingRelVisitor typeChecker = new TypeCheckingRelVisitor(plan, collector);
            typeChecker.visit();
            new CastLineageSetter(plan, collector).visit();
View Full Code Here

    public static LogicalPlan parse(String query, PigContext pc) throws FrontendException {
        Map<String, String> fileNameMap = new HashMap<String, String>();
        QueryParserDriver parserDriver = new QueryParserDriver( pc, "test", fileNameMap );
        org.apache.pig.newplan.logical.relational.LogicalPlan lp = parserDriver.parse( query );

        new ColumnAliasConversionVisitor(lp).visit();
        new SchemaAliasVisitor(lp).visit();
        new ScalarVisitor(lp, pc, "test").visit();

        CompilationMessageCollector collector = new CompilationMessageCollector() ;
View Full Code Here

    public static LogicalPlan parseAndPreprocess(String query, PigContext pc) throws FrontendException {
        Map<String, String> fileNameMap = new HashMap<String, String>();
        QueryParserDriver parserDriver = new QueryParserDriver( pc, "test", fileNameMap );
        org.apache.pig.newplan.logical.relational.LogicalPlan lp = parserDriver.parse( query );

        new ColumnAliasConversionVisitor( lp ).visit();
        new SchemaAliasVisitor( lp ).visit();
        new ScalarVisitor(lp, pc, "test").visit();

        CompilationMessageCollector collector = new CompilationMessageCollector() ;
View Full Code Here

        private LogicalPlan createAndProcessLPlan(String query) throws FrontendException {
            LogicalPlan plan = generateLogicalPlan(query);

           // new ProjectStarExpander(plan).visit();

            new ColumnAliasConversionVisitor( plan ).visit();
           // new ScalarVisitor( plan, pigContext ).visit();

            CompilationMessageCollector collector = new CompilationMessageCollector();
            new TypeCheckingRelVisitor( plan, collector).visit();
            new UnionOnSchemaSetter( plan ).visit();
View Full Code Here

            + "c = cogroup a by *, b by *;"
            + "d = foreach c generate group, flatten($1), flatten($2);"
            + "e = foreach d generate group + 1, field1 + 1, field4 + 2.0;";

            LogicalPlan plan = generateLogicalPlan(query);
            new ColumnAliasConversionVisitor( plan ).visit();
            // validate
            CompilationMessageCollector collector = new CompilationMessageCollector();
            try {
                TypeCheckingRelVisitor typeChecker = new TypeCheckingRelVisitor(plan, collector);
                typeChecker.visit();
View Full Code Here

            checkWarning(query, CAST_LOAD_NOT_FOUND);
        }

        private void checkWarning(String query, String warnMsg) throws FrontendException {
            LogicalPlan plan = generateLogicalPlan(query);
            new ColumnAliasConversionVisitor( plan ).visit();
            // validate
            CompilationMessageCollector collector = new CompilationMessageCollector();
            TypeCheckingRelVisitor typeChecker = new TypeCheckingRelVisitor(plan, collector);
            typeChecker.visit();
            new CastLineageSetter(plan, collector).visit();
View Full Code Here

        private void compile(LogicalPlan lp) throws FrontendException  {
            DanglingNestedNodeRemover DanglingNestedNodeRemover = new DanglingNestedNodeRemover( lp );
            DanglingNestedNodeRemover.visit();
           
            new ColumnAliasConversionVisitor(lp).visit();
            new SchemaAliasVisitor(lp).visit();
            new ScalarVisitor(lp, pigContext, scope).visit();

            // ImplicitSplitInsertVisitor has to be called before
            // DuplicateForEachColumnRewriteVisitor.  Detail at pig-1766
View Full Code Here

            compile( lp );
            currDAG.postProcess();
        }
       
        private void compile(LogicalPlan lp) throws FrontendException  {
            new ColumnAliasConversionVisitor( lp ).visit();
            new SchemaAliasVisitor( lp ).visit();
            new ScalarVisitor( lp, pigContext ).visit();
           
            // TODO: move optimizer here from HExecuteEngine.
            // TODO: input/output validation visitor
View Full Code Here

    public static LogicalPlan parse(String query, PigContext pc) throws FrontendException {
        Map<String, String> fileNameMap = new HashMap<String, String>();
        QueryParserDriver parserDriver = new QueryParserDriver( pc, "test", fileNameMap );
        org.apache.pig.newplan.logical.relational.LogicalPlan lp = parserDriver.parse( query );
       
        new ColumnAliasConversionVisitor( lp ).visit();
        new SchemaAliasVisitor( lp ).visit();
        new ScalarVisitor( lp, pc ).visit();
       
        CompilationMessageCollector collector = new CompilationMessageCollector() ;
       
View Full Code Here

TOP

Related Classes of org.apache.pig.newplan.logical.visitor.ColumnAliasConversionVisitor

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.