Examples of GreaterThanExpression


Examples of org.apache.pig.newplan.logical.expression.GreaterThanExpression

  //          project1.setSentinel(true);
            ProjectExpression project2 = new ProjectExpression(innerPlan, 0, 1, filter1);
                //new ProjectExpression(innerPlan, load1, 1) ;
            //project2.setSentinel(true);

            GreaterThanExpression gt1 = new GreaterThanExpression(innerPlan, project1, project2);
           
            plan.add(load1);
            plan.add(filter1);
            plan.connect(load1, filter1) ;
View Full Code Here

Examples of org.apache.pig.newplan.logical.expression.GreaterThanExpression

        ConstantExpression constant2 =  new ConstantExpression(plan,  new DataByteArray()) ;
        ConstantExpression constant3 =  new ConstantExpression(plan,  123L) ;
        ConstantExpression constant4 =  new ConstantExpression(plan,  true) ;

        SubtractExpression sub1 = new SubtractExpression(plan, constant1, constant2) ;
        GreaterThanExpression gt1 = new GreaterThanExpression(plan, sub1, constant3) ;
        AndExpression and1 = new AndExpression(plan, gt1, constant4) ;
        NotExpression not1 = new NotExpression(plan, and1) ;

        CompilationMessageCollector collector = new CompilationMessageCollector() ;
        TypeCheckingExpVisitor expTypeChecker = new TypeCheckingExpVisitor(plan, collector, null);
        expTypeChecker.visit();


        printMessageCollector(collector) ;
        //printTypeGraph(plan) ;

        if (collector.hasError()) {
            throw new Exception("Error not expected during type checking") ;
        }      


        // Induction check  
        assertEquals(DataType.INTEGER, sub1.getType()) ;   
        assertEquals(DataType.BOOLEAN, gt1.getType()) ;    
        assertEquals(DataType.BOOLEAN, and1.getType()) ;   
        assertEquals(DataType.BOOLEAN, not1.getType()) ;   

        // Cast insertion check    
        assertEquals(DataType.INTEGER, sub1.getRhs().getType()) ;   
        assertEquals(DataType.LONG, gt1.getLhs().getType()) ;

    }
View Full Code Here

Examples of org.apache.pig.newplan.logical.expression.GreaterThanExpression

        LogicalExpressionPlan plan = new LogicalExpressionPlan() ;
        ConstantExpression constant1 = new ConstantExpression(plan, 10) ;
        ConstantExpression constant2 =  new ConstantExpression(plan, 20D) ;
        ConstantExpression constant3 =  new ConstantExpression(plan, 123L) ;

        GreaterThanExpression gt1 = new GreaterThanExpression(plan, constant1, constant2) ;
        EqualExpression equal1 = new EqualExpression(plan, gt1, constant3) ;

        CompilationMessageCollector collector = new CompilationMessageCollector() ;
        LogicalRelationalOperator dummyRelOp = createDummyRelOpWithAlias();
        TypeCheckingExpVisitor expTypeChecker = new TypeCheckingExpVisitor(plan, collector, dummyRelOp);
View Full Code Here

Examples of org.apache.pig.newplan.logical.expression.GreaterThanExpression

  //          project1.setSentinel(true);
            ProjectExpression project2 = new ProjectExpression(innerPlan, 0, 1, filter1);
                //new ProjectExpression(innerPlan, load1, 1) ;
            //project2.setSentinel(true);

            GreaterThanExpression gt1 = new GreaterThanExpression(innerPlan, project1, project2);
           
            plan.add(load1);
            plan.add(filter1);
            plan.connect(load1, filter1) ;
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

      super();
    }
    protected Expression buildAction(Expression var, Expression startValue, Expression endValue) {
      AndExpression expr = new AndExpression();
      if (startValue != null) {
        expr.add(new GreaterThanExpression(var, startValue, getComparator()));
      }
      if (endValue != null) {
        expr.add(new LowerThanExpression(var, endValue, getComparator()));
      }
      return expr;
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

    }   
    protected Expression buildAction(Expression var, Expression startValue, Expression endValue) {
      AndExpression expr = new AndExpression();
      if (startValue != null) {
        expr.add(new OrExpression().add(
            new GreaterThanExpression(var, startValue, getComparator())).add(
                new ComparedEqualsExpression(var, startValue, getComparator())));
      }
      if (endValue != null) {
        expr.add(new OrExpression().add(
            new LowerThanExpression(var, endValue, getComparator())).add(
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

    }   
    public GreaterThan() {
      super();
    }
    protected Expression buildAction(Map filterInfo, Expression leftOperand, Expression rightOperand) {
      return new GreaterThanExpression(leftOperand, rightOperand, getComparator());
    }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

    public GreaterThanOrEquals() {
      super();
    }
    protected Expression buildAction(Map filterInfo, Expression leftOperand, Expression rightOperand) {
      return new OrExpression().
      add(new GreaterThanExpression(leftOperand, rightOperand, getComparator())).   
      add(new ComparedEqualsExpression(leftOperand, rightOperand, getComparator()));
    }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

  }
 
  public static class GreaterThan extends SimpleProcedureFilter {
    private static final long serialVersionUID = 1L;
    protected Expression buildAction(Map filterInfo, Expression leftOperand, Expression rightOperand) {
      return new GreaterThanExpression(leftOperand, rightOperand, getComparator());
    }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.compare.GreaterThanExpression

 
  public static class GreaterThanOrEquals extends SimpleProcedureFilter {
    private static final long serialVersionUID = 1L;
    protected Expression buildAction(Map filterInfo, Expression leftOperand, Expression rightOperand) {
      return new OrExpression().
      add(new GreaterThanExpression(leftOperand, rightOperand, getComparator())).   
      add(new ComparedEqualsExpression(leftOperand, rightOperand, getComparator()));
    }
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.