Timestamp#
- class rbc.heavydb.Timestamp(time)#
RBC
Timestamptype that corresponds to HeavyDB type TIMESTAMP.struct Timestamp { int64_t time; };
from rbc.heavydb import Timestamp @heavydb('int32_t(Column<Timestamp>, RowMultiplier, Column<int64_t>') def get_years(column_times, m, column_hours): for i in range(len(column_times)): column_hours[i] = column_times[i].getHours() return len(column_times)
All comparison (dunder methods) are implemented for this class.
Methods
Timestamp.__init__(time)Get
timeas dayGet
timeas hoursGet
timeas microsecondsGet
timeas millisecondsGet
timeas minutesGet
timeas monthGet
timeas secondsGet
timeas yearReturn a new
Timestampwithtimetruncated to dayReturn a new
Timestampwithtimetruncated to hoursReturn a new
Timestampwithtimetruncated to microsecondsReturn a new
Timestampwithtimetruncated to millisecondsReturn a new
Timestampwithtimetruncated to minutesReturn a new
Timestampwithtimetruncated to monthReturn a new
Timestampwithtimetruncated to secondsReturn a new
Timestampwithtimetruncated to year- Parameters:
time (int | nb_types.StringLiteral) –
- Return type: