OmniSciDB
a5dc49c757
|
#include <array>
#include <cstdint>
#include "../Shared/funcannotations.h"
#include "ExtractFromTime.h"
Go to the source code of this file.
Enumerations | |
enum | DatetruncField { dtYEAR = 0, dtQUARTER, dtMONTH, dtDAY, dtHOUR, dtMINUTE, dtSECOND, dtMILLISECOND, dtMICROSECOND, dtNANOSECOND, dtMILLENNIUM, dtCENTURY, dtDECADE, dtWEEK, dtWEEK_SUNDAY, dtWEEK_SATURDAY, dtQUARTERDAY, dtINVALID } |
Functions | |
DEVICE int64_t | DateTruncate (DatetruncField field, const int64_t timeval) |
RUNTIME_EXPORT DEVICE int64_t | DateTruncateHighPrecisionToDate (const int64_t timeval, const int64_t scale) |
Variables | |
constexpr std::array< char const *, dtINVALID > | datetrunc_fname_lookup |
enum DatetruncField |
Enumerator | |
---|---|
dtYEAR | |
dtQUARTER | |
dtMONTH | |
dtDAY | |
dtHOUR | |
dtMINUTE | |
dtSECOND | |
dtMILLISECOND | |
dtMICROSECOND | |
dtNANOSECOND | |
dtMILLENNIUM | |
dtCENTURY | |
dtDECADE | |
dtWEEK | |
dtWEEK_SUNDAY | |
dtWEEK_SATURDAY | |
dtQUARTERDAY | |
dtINVALID |
Definition at line 27 of file DateTruncate.h.
DEVICE int64_t DateTruncate | ( | DatetruncField | field, |
const int64_t | timeval | ||
) |
Definition at line 242 of file DateTruncate.cpp.
References datetrunc_century(), datetrunc_day(), datetrunc_decade(), datetrunc_hour(), datetrunc_millennium(), datetrunc_minute(), datetrunc_month(), datetrunc_quarter(), datetrunc_quarterday(), datetrunc_week_monday(), datetrunc_week_saturday(), datetrunc_week_sunday(), datetrunc_year(), dtCENTURY, dtDAY, dtDECADE, dtHOUR, dtMICROSECOND, dtMILLENNIUM, dtMILLISECOND, dtMINUTE, dtMONTH, dtNANOSECOND, dtQUARTER, dtQUARTERDAY, dtSECOND, dtWEEK, dtWEEK_SATURDAY, dtWEEK_SUNDAY, and dtYEAR.
Referenced by Analyzer::Constant::do_cast(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), DateTimeTranslator::getDateTruncConstantValue(), Timestamp::truncateToDay(), Timestamp::truncateToHours(), Timestamp::truncateToMinutes(), Timestamp::truncateToMonth(), and Timestamp::truncateToYear().
RUNTIME_EXPORT DEVICE int64_t DateTruncateHighPrecisionToDate | ( | const int64_t | timeval, |
const int64_t | scale | ||
) |
Definition at line 286 of file DateTruncate.cpp.
References floor_div(), and kSecsPerDay.
Referenced by DateTruncateHighPrecisionToDateNullable(), Analyzer::Constant::do_cast(), and Executor::skipFragment().
constexpr std::array<char const*, dtINVALID> datetrunc_fname_lookup |
Definition at line 49 of file DateTruncate.h.
Referenced by CodeGenerator::codegen(), and CodeGenerator::codegenDateTruncHighPrecisionTimestamps().