private void writeTimecolumn ( LongColumnVector col , String columnType , int cIdx , int rowNumber , ParseWriter dout ) { boolean timestamp = columnType . equals ( "timestamp" ) ; long [ ] oneColumn = col . vector ; if ( col . isRepeating ) { long val = timestamp ? oneColumn [ 0 ] / 1000000 : correctTimeStamp ( oneColumn [ 0 ] ) ; for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) dout . addNumCol ( cIdx , val , 0 ) ; } else if ( col . noNulls ) { for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) dout . addNumCol ( cIdx , timestamp ? oneColumn [ rowIndex ] / 1000000 : correctTimeStamp ( oneColumn [ rowIndex ] ) , 0 ) ; } else { boolean [ ] isNull = col . isNull ; for ( int rowIndex = 0 ; rowIndex < rowNumber ; rowIndex ++ ) { if ( isNull [ rowIndex ] ) dout . addInvalidCol ( cIdx ) ; else dout . addNumCol ( cIdx , timestamp ? oneColumn [ rowIndex ] / 1000000 : correctTimeStamp ( oneColumn [ rowIndex ] ) , 0 ) ; } } }
This method writes one column of H2O frame for column type timestamp . This is just a long that records the number of seconds since Jan 1 2015 .