Package org.apache.drill.exec.ref.values.ScalarValues

Examples of org.apache.drill.exec.ref.values.ScalarValues.DoubleScalar


    case DOUBLE:
      double d = 0d;
      for(int i =0; i < values.length; i++){
        d += values[i].getAsDouble();
      }
      return new DoubleScalar(d);
    case FLOAT:
      float f = 0f;
      for(int i =0; i < values.length; i++){
        f += values[i].getAsFloat();
      }
View Full Code Here


    } else if (node.isFloatingPointNumber()) {
      if (node.isBigDecimal()) {
        throw new UnsupportedOperationException();
//        return new BigDecimalScalar(node.decimalValue());
      } else {
        return new DoubleScalar(node.asDouble());
      }
    } else if (node.isInt()) {
      return new IntegerScalar(node.asInt());
    } else if (node.isLong()) {
      return new LongScalar(node.asLong());
View Full Code Here

    return new LongScalar(longExpr.getLong());
  }

  @Override
  public BasicEvaluator visitDoubleConstant(DoubleExpression dExpr) {
    return new DoubleScalar(dExpr.getDouble());
  }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.ref.values.ScalarValues.DoubleScalar

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.