Package org.apache.drill.exec.expr.holders

Examples of org.apache.drill.exec.expr.holders.Decimal28SparseHolder


    return dch;
  }

  public static Decimal28SparseHolder getDecimal28Holder(String decimal) {

    Decimal28SparseHolder dch = new Decimal28SparseHolder();

    BigDecimal bigDecimal = new BigDecimal(decimal);

    dch.scale = bigDecimal.scale();
    dch.precision = bigDecimal.precision();
    dch.setSign(bigDecimal.signum() == -1);
    dch.start = 0;

    dch.buffer = Unpooled.wrappedBuffer(new byte[5 * DecimalUtility.integerSize]);
    dch.buffer = new SwappedByteBuf(dch.buffer);
    DecimalUtility.getSparseFromBigDecimal(bigDecimal, dch.buffer, dch.start, dch.scale, dch.precision, dch.nDecimalDigits);
View Full Code Here


    return dch;
  }

  public static Decimal28SparseHolder getDecimal28Holder(DrillBuf buf, String decimal) {

    Decimal28SparseHolder dch = new Decimal28SparseHolder();

    BigDecimal bigDecimal = new BigDecimal(decimal);

    dch.scale = bigDecimal.scale();
    dch.precision = bigDecimal.precision();
View Full Code Here

        decimal18Holder.scale = valueMajorType.getScale();
        decimal18Holder.precision = valueMajorType.getPrecision();
        mapWriter.decimal18(MappifyUtility.fieldValue).write(decimal18Holder);
        break;
      case DECIMAL28SPARSE:
        Decimal28SparseHolder decimal28Holder = new Decimal28SparseHolder();

        // Ensure that the buffer used to store decimal is of sufficient length
        buffer.reallocIfNeeded(decimal28Holder.WIDTH);
        decimal28Holder.scale = valueMajorType.getScale();
        decimal28Holder.precision = valueMajorType.getPrecision();
View Full Code Here

    return dch;
  }

  public static Decimal28SparseHolder getDecimal28Holder(DrillBuf buf, String decimal) {

    Decimal28SparseHolder dch = new Decimal28SparseHolder();

    BigDecimal bigDecimal = new BigDecimal(decimal);

    dch.scale = bigDecimal.scale();
    dch.precision = bigDecimal.precision();
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.expr.holders.Decimal28SparseHolder

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.