kudu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauricio Aristizabal <mauri...@impact.com>
Subject Right way to insert to timestamp column via Java api
Date Wed, 02 May 2018 22:43:20 GMT
Impala docs
indicate that "Kudu represents date/time columns using 64-bit values" and
also that "the time portion of a TIMESTAMP value is in nanoseconds", and I
know a Java Date "stores time in milliseconds since January 1, 1970" so
since there is no partialRow.addTimestamp I did a

partialRow.addLong(someJavaUtilDate.getTime() * 1000)

and that seems to work, but it's kinda hokey.  Am I doing this right?

Also, would be nice to update the java sample
with a few more column types and operations.



Mauricio Aristizabal
Architect - Data Pipeline
*M * 323 309 4260
*E  *mauricio@impact.com  |  *W * https://impact.com


View raw message