static int ctime_bool(const ObObjCastParams ¶ms, const ObExprObj &in, ObExprObj &out) { UNUSED(params); OB_ASSERT(in.get_type() == ObCreateTimeType); out.set_bool(static_cast<bool> (in.get_ctime())); return OB_SUCCESS; }
static int ctime_pdatetime(const ObObjCastParams ¶ms, const ObExprObj &in, ObExprObj &out) { UNUSED(params); OB_ASSERT(in.get_type() == ObCreateTimeType); out.set_precise_datetime(static_cast<ObPreciseDateTime> (in.get_ctime())); return OB_SUCCESS; }
static int ctime_decimal(const ObObjCastParams ¶ms, const ObExprObj &in, ObExprObj &out) { UNUSED(params); OB_ASSERT(in.get_type() == ObCreateTimeType); ObNumber num; num.from(static_cast<int64_t> (in.get_ctime())); out.set_decimal(num); return OB_SUCCESS; }
static int ctime_varchar(const ObObjCastParams ¶ms, const ObExprObj &in, ObExprObj &out) { UNUSED(params); OB_ASSERT(in.get_type() == ObCreateTimeType); return timestamp_varchar(in.get_ctime(), out); }