Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Jan 9, 2018
1 parent 8fc2162 commit 91b3d66
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private void putNonNullFloats(int count, DoubleColumnVector fromColumn, Writable

private void putNonNullDecimals(int count, DecimalColumnVector fromColumn, WritableColumnVector toColumn, DecimalType type) {
DecimalColumnVector data = fromColumn;
if (type.precision() > Decimal.MAX_INT_DIGITS()) {
if (type.precision() > Decimal.MAX_LONG_DIGITS()) {
WritableColumnVector arrayData = toColumn.getChildColumn(0);
arrayData.reserve(count * 16);
}
Expand Down Expand Up @@ -590,6 +590,10 @@ private void putByteArrays(int count, BytesColumnVector fromColumn, WritableColu

private void putDecimals(int count, DecimalColumnVector fromColumn, WritableColumnVector toColumn, DecimalType type) {
HiveDecimalWritable[] vector = fromColumn.vector;
if (type.precision() > Decimal.MAX_LONG_DIGITS()) {
WritableColumnVector arrayData = toColumn.getChildColumn(0);
arrayData.reserve(count * 16);
}
for (int index = 0; index < count; index++) {
if (fromColumn.isNull[index]) {
toColumn.putNull(index);
Expand Down

0 comments on commit 91b3d66

Please sign in to comment.