Package plan_runner.expressions

Examples of plan_runner.expressions.ValueExpression


    visit(p);
  }

  @Override
  public void visit(ComparisonPredicate comparison) {
    ValueExpression val;

    if (_comeFromFirstEmitter)
      val = (ValueExpression) comparison.getExpressions().get(0);
    else
      val = (ValueExpression) comparison.getExpressions().get(1);

    _valuesToIndex.add(val.eval(_tuple).toString());
    _typesOfValuesToIndex.add(val.getType().getInitialValue());
  }
View Full Code Here


    // expr is changed in place, so that it does not contain synonims
    final int position = _nt.indexOf(_tupleSchema, expr);
    if (position != ParserUtil.NOT_FOUND) {
      // we found an expression already in the tuple schema
      final TypeConversion tc = _nt.getType(_tupleSchema, expr);
      final ValueExpression ve = new ColumnReference(tc, position,
          ParserUtil.getStringExpr(expr));
      pushToExprStack(ve);
      return true;
    } else
      return false;
View Full Code Here

    final int position = _nt.getColumnIndex(_tupleSchema, column);

    // extract type for the column
    final TypeConversion tc = _nt.getType(_tupleSchema, column);

    final ValueExpression ve = new ColumnReference(tc, position,
        ParserUtil.getStringExpr(column));
    pushToExprStack(ve);
  }
View Full Code Here

    // expr is changed in place, so that it does not contain synonims
    final int position = _nt.indexOf(_tupleSchema, expr);
    if (position != ParserUtil.NOT_FOUND) {
      // we found an expression already in the tuple schema
      final TypeConversion tc = _nt.getType(_tupleSchema, expr);
      final ValueExpression ve = new ColumnReference(tc, position,
          ParserUtil.getStringExpr(expr));
      pushToExprStack(ve);
      return true;
    } else
      return false;
View Full Code Here

      final int position = _nt.getColumnIndex(_tupleSchema, column);

      // extract type for the column
      final TypeConversion tc = _nt.getType(_tupleSchema, column);

      final ValueExpression ve = new ColumnReference(tc, position,
          ParserUtil.getStringExpr(column));
      pushToExprStack(ve);
    } else
      throw new NotFromMyBranchException();
  }
View Full Code Here

  @Override
  public void visit(GreaterThanEquals gte) {
    visitBinaryOperation(gte);

    final ValueExpression right = _exprStack.pop();
    final ValueExpression left = _exprStack.pop();

    final ComparisonPredicate cp = new ComparisonPredicate(ComparisonPredicate.NONLESS_OP,
        left, right);
    _predStack.push(cp);
  }
View Full Code Here

  @Override
  public void visit(LikeExpression le) {
    visitBinaryOperation(le);

    final ValueExpression right = _exprStack.pop();
    final ValueExpression left = _exprStack.pop();

    final LikePredicate lp = new LikePredicate(left, right);
    _predStack.push(lp);
  }
View Full Code Here

    _predStack.push(lp);
  }

  @Override
  public void visit(LongValue lv) {
    final ValueExpression ve = new ValueSpecification(_lc, lv.getValue());
    _exprStack.push(ve);
  }
View Full Code Here

  @Override
  public void visit(MinorThan mt) {
    visitBinaryOperation(mt);

    final ValueExpression right = _exprStack.pop();
    final ValueExpression left = _exprStack.pop();

    final ComparisonPredicate cp = new ComparisonPredicate(ComparisonPredicate.LESS_OP, left,
        right);
    _predStack.push(cp);
  }
View Full Code Here

  @Override
  public void visit(MinorThanEquals mte) {
    visitBinaryOperation(mte);

    final ValueExpression right = _exprStack.pop();
    final ValueExpression left = _exprStack.pop();

    final ComparisonPredicate cp = new ComparisonPredicate(ComparisonPredicate.NONGREATER_OP,
        left, right);
    _predStack.push(cp);
  }
View Full Code Here

TOP

Related Classes of plan_runner.expressions.ValueExpression

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.