public static void floor(int i, HiveDecimalWritable input, DecimalColumnVector outputColVector) {
    HiveDecimalWritable decWritable = outputColVector.vector[i];
    decWritable.set(input);
    decWritable.mutateSetScale(0, HiveDecimal.ROUND_FLOOR);
    decWritable.mutateEnforcePrecisionScale(outputColVector.precision, outputColVector.scale);
    if (!decWritable.isSet()) {
      outputColVector.noNulls = false;
      outputColVector.isNull[i] = true;
    }
  }
Utility functions for vector operations on decimal values.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/DecimalUtil.java