private void writeDecimalcolumn ( DecimalColumnVector col , int cIdx , int rowNumber , ParseWriter dout ) { HiveDecimalWritable [ ] oneColumn = col . vector ; if ( col . isRepeating ) { HiveDecimal hd = oneColumn [ 0 ] . getHiveDecimal ( ) ; for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) dout . addNumCol ( cIdx , hd . unscaledValue ( ) . longValue ( ) , - hd . scale ( ) ) ; } else if ( col . noNulls ) { for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) { HiveDecimal hd = oneColumn [ rowIndex ] . getHiveDecimal ( ) ; dout . addNumCol ( cIdx , hd . unscaledValue ( ) . longValue ( ) , - hd . scale ( ) ) ; } } else { boolean [ ] isNull = col . isNull ; for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) { if ( isNull [ rowIndex ] ) dout . addInvalidCol ( cIdx ) ; else { HiveDecimal hd = oneColumn [ rowIndex ] . getHiveDecimal ( ) ; dout . addNumCol ( cIdx , hd . unscaledValue ( ) . longValue ( ) , - hd . scale ( ) ) ; } } } }
This method writes a column to H2O frame for column type Decimal . It is just written as some integer without using the scale field . Need to make sure this is what the customer wants .