Package plan_runner.expressions

Examples of plan_runner.expressions.ValueExpression


   */
  @Override
  public void visit(Addition adtn) {
    visitBinaryExpression(adtn);

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

    final ValueExpression ve = new plan_runner.expressions.Addition(left, right);
    _exprStack.push(ve);
  }
View Full Code Here


    final TypeConversion tc = _schema.getType(ParserUtil.getFullSchemaColumnName(column, _tan));

    // extract the position (index) of the required column
    final int position = _it.getColumnIndex(column, _affectedComponent);

    final ValueExpression ve = new ColumnReference(tc, position);
    _exprStack.push(ve);
  }
View Full Code Here

    throw new UnsupportedOperationException("Not supported yet.");
  }

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

  @Override
  public void visit(Division dvsn) {
    visitBinaryExpression(dvsn);

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

    final ValueExpression ve = new plan_runner.expressions.Division(left, right);
    _exprStack.push(ve);
  }
View Full Code Here

    _exprStack.push(ve);
  }

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

    final String fnName = function.getName();
    if (fnName.equalsIgnoreCase("SUM")) {
      // there must be only one parameter, if not SQL parser will raise an
      // exception
      final ValueExpression expr = expressions.get(0);
      createSum(expr, function.isDistinct());
    } else if (fnName.equalsIgnoreCase("COUNT"))
      createCount(expressions, function.isDistinct());
    else if (fnName.equalsIgnoreCase("EXTRACT_YEAR")) {
      if (numParams != 1)
        throw new RuntimeException("EXTRACT_YEAR function has exactly one parameter!");
      final ValueExpression expr = expressions.get(0);
      final ValueExpression ve = new IntegerYearFromDate(expr);
      _exprStack.push(ve);
    }
  }
View Full Code Here

    throw new UnsupportedOperationException("Not supported yet.");
  }

  @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(Multiplication m) {
    visitBinaryExpression(m);

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

    final ValueExpression ve = new plan_runner.expressions.Multiplication(left, right);
    _exprStack.push(ve);
  }
View Full Code Here

    doneSingleItem(expr);
  }

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

  @Override
  public void visit(Subtraction s) {
    visitBinaryExpression(s);

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

    final ValueExpression ve = new plan_runner.expressions.Subtraction(left, right);
    _exprStack.push(ve);

  }
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.