Timestamp#
- class rbc.heavydb.Timestamp(time)#
RBC
Timestamp
type 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
time
as dayGet
time
as hoursGet
time
as microsecondsGet
time
as millisecondsGet
time
as minutesGet
time
as monthGet
time
as secondsGet
time
as yearReturn a new
Timestamp
withtime
truncated to dayReturn a new
Timestamp
withtime
truncated to hoursReturn a new
Timestamp
withtime
truncated to microsecondsReturn a new
Timestamp
withtime
truncated to millisecondsReturn a new
Timestamp
withtime
truncated to minutesReturn a new
Timestamp
withtime
truncated to monthReturn a new
Timestamp
withtime
truncated to secondsReturn a new
Timestamp
withtime
truncated to year- Parameters:
time (int | nb_types.StringLiteral) –
- Return type: