OmniSciDB
b24e664e58
|
Go to the source code of this file.
Enumerations | |
enum | ExtractField { kYEAR, kQUARTER, kMONTH, kDAY, kHOUR, kMINUTE, kSECOND, kMILLISECOND, kMICROSECOND, kNANOSECOND, kDOW, kISODOW, kDOY, kEPOCH, kQUARTERDAY, kWEEK } |
Functions | |
DEVICE int32_t | extract_dow (const int64_t lcltime) |
DEVICE tm | gmtime_r_newlib (const int64_t lcltime, tm &res) |
DEVICE NEVER_INLINE int64_t | ExtractFromTime (ExtractField field, const int64_t timeval) |
Variables | |
static constexpr int64_t | kNanoSecsPerSec = 1000000000 |
static constexpr int64_t | kMicroSecsPerSec = 1000000 |
static constexpr int64_t | kMilliSecsPerSec = 1000 |
static constexpr int64_t | kSecsPerMin = 60 |
static constexpr int64_t | kMinsPerHour = 60 |
static constexpr int64_t | kHoursPerDay = 24 |
static constexpr int64_t | kSecPerHour = 3600 |
static constexpr int64_t | kSecsPerDay = 86400 |
static constexpr int64_t | kSecsPerQuarterDay = 21600 |
static constexpr int32_t | kDaysPerWeek = 7 |
static constexpr int32_t | kMonsPerYear = 12 |
static constexpr int64_t | kSecsPerHalfDay = 43200 |
static constexpr int64_t | kMinsPerMonth = 43200 |
static constexpr int32_t | kYearBase = 1900 |
static constexpr int32_t | kEpochAdjustedDays = 11017 |
static constexpr int32_t | kEpochAdjustedYears = 2000 |
static constexpr int32_t | kEpochAdjustedWDay = 3 |
static constexpr int64_t | kDaysPer400Years = 146097 |
static constexpr int64_t | kDaysPer100Years = 36524 |
static constexpr int32_t | kDaysPer4Years = 3 * 365 + 366 |
static constexpr int32_t | kDaysPerYear = 365 |
static constexpr int32_t | kDaysInJanuary = 31 |
static constexpr int32_t | kDaysInFebruary = 28 |
static constexpr uint32_t | kSecondsPerNonLeapYear = 31536000 |
static constexpr uint32_t | kSecondsPer4YearCycle = 126230400 |
static constexpr uint32_t | kUSecsPerDay = 86400 |
static constexpr uint32_t | kEpochOffsetYear1900 = 2208988800 |
static constexpr uint32_t | kSecsJanToMar1900 = 5097600 |
enum ExtractField |
Enumerator | |
---|---|
kYEAR | |
kQUARTER | |
kMONTH | |
kDAY | |
kHOUR | |
kMINUTE | |
kSECOND | |
kMILLISECOND | |
kMICROSECOND | |
kNANOSECOND | |
kDOW | |
kISODOW | |
kDOY | |
kEPOCH | |
kQUARTERDAY | |
kWEEK |
Definition at line 69 of file ExtractFromTime.h.
DEVICE int32_t extract_dow | ( | const int64_t | lcltime | ) |
Definition at line 63 of file ExtractFromTime.cpp.
References kDaysPerWeek, kEpochAdjustedDays, kEpochAdjustedWDay, and kSecsPerDay.
Referenced by DateTruncate(), and ExtractFromTime().
DEVICE NEVER_INLINE int64_t ExtractFromTime | ( | ExtractField | field, |
const int64_t | timeval | ||
) |
Definition at line 247 of file ExtractFromTime.cpp.
References extract_dow(), extract_hour(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_month_fast(), extract_nanosecond(), extract_quarter_fast(), extract_quarterday(), extract_second(), extract_year_fast(), gmtime_r_newlib(), kDAY, kDOW, kDOY, kEPOCH, kEpochOffsetYear1900, kHOUR, kISODOW, kMICROSECOND, kMILLISECOND, kMINUTE, kMONTH, kNANOSECOND, kQUARTER, kQUARTERDAY, kSECOND, kWEEK, and kYEAR.
Referenced by ExtractFromTimeNullable(), getExpressionRange(), and DateTimeTranslator::getExtractFromTimeConstantValue().
DEVICE tm gmtime_r_newlib | ( | const int64_t | lcltime, |
tm & | res | ||
) |
Definition at line 150 of file ExtractFromTime.cpp.
References kDaysInFebruary, kDaysInJanuary, kDaysPer100Years, kDaysPer400Years, kDaysPer4Years, kDaysPerWeek, kDaysPerYear, kEpochAdjustedDays, kEpochAdjustedWDay, kEpochAdjustedYears, kMonsPerYear, kSecPerHour, kSecsPerDay, kSecsPerMin, kYearBase, and run_benchmark_import::res.
Referenced by DateTruncate(), and ExtractFromTime().
|
static |
Definition at line 61 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 59 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 53 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 51 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 55 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 33 of file ExtractFromTime.h.
Referenced by DateDiff(), extract_dow(), and gmtime_r_newlib().
|
static |
Definition at line 57 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 45 of file ExtractFromTime.h.
Referenced by create_epoch(), extract_dow(), extract_hour(), extract_minute(), and gmtime_r_newlib().
|
static |
Definition at line 49 of file ExtractFromTime.h.
Referenced by extract_dow(), and gmtime_r_newlib().
|
static |
Definition at line 47 of file ExtractFromTime.h.
Referenced by create_epoch(), and gmtime_r_newlib().
|
static |
Definition at line 66 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), extract_quarter_fast(), extract_year_fast(), and ExtractFromTime().
|
static |
Definition at line 29 of file ExtractFromTime.h.
|
static |
Definition at line 25 of file ExtractFromTime.h.
Referenced by DateDiff(), DateDiffHighPrecision(), extract_microsecond(), DateTimeUtils::get_dateadd_high_precision_adjusted_scale(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), and DateTimeUtils::get_timestamp_precision_scale().
|
static |
Definition at line 26 of file ExtractFromTime.h.
Referenced by ArrowResultSetConverter::appendToColumnBuilder(), DateDiff(), DateDiffHighPrecision(), extract_millisecond(), DateTimeUtils::get_dateadd_high_precision_adjusted_scale(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), and DateTimeUtils::get_timestamp_precision_scale().
|
static |
Definition at line 28 of file ExtractFromTime.h.
|
static |
Definition at line 36 of file ExtractFromTime.h.
|
static |
Definition at line 34 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), and gmtime_r_newlib().
|
static |
Definition at line 24 of file ExtractFromTime.h.
Referenced by DateDiff(), DateDiffHighPrecision(), extract_nanosecond(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), and DateTimeUtils::get_timestamp_precision_scale().
|
static |
Definition at line 64 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 63 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 30 of file ExtractFromTime.h.
Referenced by DateDiff(), DateTruncate(), extract_hour(), extract_minute(), and gmtime_r_newlib().
|
static |
Definition at line 67 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 31 of file ExtractFromTime.h.
Referenced by create_epoch(), DateDiff(), DateTruncate(), DateTruncateHighPrecisionToDate(), extract_dow(), extract_hour(), extract_minute(), extract_quarter_fast(), DateConverters::get_epoch_days_from_seconds(), DateConverters::get_epoch_seconds_from_days(), and gmtime_r_newlib().
|
static |
Definition at line 35 of file ExtractFromTime.h.
Referenced by TimeGM::parse_meridians().
|
static |
Definition at line 27 of file ExtractFromTime.h.
Referenced by DateDiff(), DateTruncate(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_nanosecond(), extract_second(), and gmtime_r_newlib().
|
static |
Definition at line 32 of file ExtractFromTime.h.
Referenced by DateDiff(), DateTruncate(), and extract_quarterday().
|
static |
Definition at line 65 of file ExtractFromTime.h.
Referenced by DateTruncate(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 38 of file ExtractFromTime.h.
Referenced by DateTruncate(), and gmtime_r_newlib().