Package org.apache.pig.parser

Examples of org.apache.pig.parser.SourceLocation


    public Operator(String n, OperatorPlan p) {
        name = n;
        plan = p;
        annotations = new HashMap<String, Object>();
        location = new SourceLocation();
    }
View Full Code Here


           
            Throwable t = stats.getErrorThrowable();
            assertTrue(t instanceof FrontendException);
           
            FrontendException fe = (FrontendException) t;
            SourceLocation sl = fe.getSourceLocation();
            assertEquals(2, sl.line());
            assertEquals(15, sl.offset());
           
            Throwable cause = fe.getCause();
            assertTrue(cause instanceof ParserException);
           
        } catch (Exception e) {
View Full Code Here

     * @param node the operator
     * @return a list of macros
     */
    protected List<String> getMacroList(LogicalRelationalOperator node) {
        List<String> macro = Lists.newArrayList();
        SourceLocation loc = node.getLocation();
        if (loc.node() != null) {
            InvocationPoint p = loc.node().getNextInvocationPoint();
            while (p != null) {
                if (p.getMacro() != null) {
                    macro.add(p.getMacro());
                }
                p = loc.node().getNextInvocationPoint();
            }
        }
        return macro;
    }
View Full Code Here

        ProjectExpression copy = new ProjectExpression(
                lgExpPlan,
                this.getInputNum(),
                this.getColNum(),
                this.getAttachedRelationalOp());
        copy.setLocation( new SourceLocation( location ) );
        copy.alias = alias;
        copy.isRangeProject = this.isRangeProject;
        copy.startCol = this.startCol;
        copy.endCol = this.endCol;
        copy.startAlias = this.startAlias;
View Full Code Here

            }
           
        } catch(CloneNotSupportedException e) {
             e.printStackTrace();
        }
        copy.setLocation( new SourceLocation( location ) );
        return copy;
    }
View Full Code Here

        // Outer list corresponds to join predicates and inner list corresponds to type of keys for each predicate.
        List<List<Byte>> keyTypes = new ArrayList<List<Byte>>();

        boolean[] innerFlags = loj.getInnerFlags();
        String alias = loj.getAlias();
        SourceLocation location = loj.getLocation();
        int parallel = loj.getRequestedParallelism();

        for (int i=0;i<inputs.size();i++) {
            Operator op = inputs.get(i);
            PhysicalOperator physOp = logToPhyMap.get(op);
View Full Code Here

        // Outer list corresponds to join predicates and inner list corresponds to type of keys for each predicate.
        List<List<Byte>> keyTypes = new ArrayList<List<Byte>>();

        boolean[] innerFlags = loj.getInnerFlags();
        String alias = loj.getAlias();
        SourceLocation location = loj.getLocation();
        int parallel = loj.getRequestedParallelism();

        for (int i=0;i<inputs.size();i++) {
            Operator op = inputs.get(i);
            PhysicalOperator physOp = logToPhyMap.get(op);
View Full Code Here

        ProjectExpression copy = new ProjectExpression(
                lgExpPlan,
                this.getInputNum(),
                this.getColNum(),
                this.getAttachedRelationalOp());
        copy.setLocation( new SourceLocation( location ) );
        copy.alias = alias;
        copy.projectedOperator = this.projectedOperator;
        copy.isRangeProject = this.isRangeProject;
        copy.startCol = this.startCol;
        copy.endCol = this.endCol;
View Full Code Here

            }

        } catch(CloneNotSupportedException e) {
             e.printStackTrace();
        }
        copy.setLocation( new SourceLocation( location ) );
        return copy;
    }
View Full Code Here

        ProjectExpression copy = new ProjectExpression(
                lgExpPlan,
                this.getInputNum(),
                this.getColNum(),
                this.getAttachedRelationalOp());
        copy.setLocation( new SourceLocation( location ) );
        copy.alias = alias;
        copy.isRangeProject = this.isRangeProject;
        copy.startCol = this.startCol;
        copy.endCol = this.endCol;
        copy.startAlias = this.startAlias;
View Full Code Here

TOP

Related Classes of org.apache.pig.parser.SourceLocation

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.