OmniSciDB
a5dc49c757
|
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, kWEEK_SUNDAY, kWEEK_SATURDAY, kDATEEPOCH, kUNKNOWN_FIELD } |
Functions | |
DEVICE int64_t | ExtractFromTime (ExtractField field, const int64_t timeval) |
DEVICE int64_t | floor_div (int64_t const dividend, int64_t const divisor) |
DEVICE int64_t | unsigned_mod (int64_t const dividend, int64_t const divisor) |
Variables | |
static constexpr int64_t | kNanoSecsPerSec = 1000000000 |
static constexpr int64_t | kMicroSecsPerSec = 1000000 |
static constexpr int64_t | kMilliSecsPerSec = 1000 |
static constexpr int64_t | kMilliSecsPerMin = 60000 |
static constexpr int64_t | kMilliSecsPerHour = 3600000 |
static constexpr int64_t | kMilliSecsPerDay = 86400000 |
static constexpr int64_t | kSecsPerMin = 60 |
static constexpr int64_t | kMinsPerHour = 60 |
static constexpr int64_t | kHoursPerDay = 24 |
static constexpr int64_t | kSecsPerHour = 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 |
constexpr unsigned | MARJAN = 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 |
constexpr unsigned | JANMAR = 31 + 28 |
enum ExtractField |
Enumerator | |
---|---|
kYEAR | |
kQUARTER | |
kMONTH | |
kDAY | |
kHOUR | |
kMINUTE | |
kSECOND | |
kMILLISECOND | |
kMICROSECOND | |
kNANOSECOND | |
kDOW | |
kISODOW | |
kDOY | |
kEPOCH | |
kQUARTERDAY | |
kWEEK | |
kWEEK_SUNDAY | |
kWEEK_SATURDAY | |
kDATEEPOCH | |
kUNKNOWN_FIELD |
Definition at line 77 of file ExtractFromTime.h.
DEVICE int64_t ExtractFromTime | ( | ExtractField | field, |
const int64_t | timeval | ||
) |
Definition at line 294 of file ExtractFromTime.cpp.
References extract_dateepoch(), extract_day(), extract_day_of_year(), extract_dow(), extract_epoch(), extract_hour(), extract_isodow(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_month(), extract_nanosecond(), extract_quarter(), extract_quarterday(), extract_second(), extract_week_monday(), extract_week_saturday(), extract_week_sunday(), extract_year(), kDATEEPOCH, kDAY, kDOW, kDOY, kEPOCH, kHOUR, kISODOW, kMICROSECOND, kMILLISECOND, kMINUTE, kMONTH, kNANOSECOND, kQUARTER, kQUARTERDAY, kSECOND, kUNKNOWN_FIELD, kWEEK, kWEEK_SATURDAY, kWEEK_SUNDAY, and kYEAR.
Referenced by Timestamp::getDay(), getExpressionRange(), DateTimeTranslator::getExtractFromTimeConstantValue(), Timestamp::getHours(), Timestamp::getMicroseconds(), Timestamp::getMilliseconds(), Timestamp::getMinutes(), Timestamp::getMonth(), Timestamp::getNanoseconds(), Timestamp::getSeconds(), and Timestamp::getYear().
|
inline |
Definition at line 104 of file ExtractFromTime.h.
Referenced by DateDiffHighPrecision(), datetrunc_century(), datetrunc_decade(), datetrunc_millennium(), datetrunc_month(), datetrunc_quarter(), datetrunc_year(), DateTruncateHighPrecisionToDate(), extract_day(), extract_day_of_year(), extract_dow(), extract_isodow(), extract_month(), extract_quarter(), extract_week(), extract_year(), ExtractTimeFromHPTimestamp(), ExtractExpr::generate(), DateTimeTranslator::getDateTruncConstantValue(), DateTimeTranslator::getExtractFromTimeConstantValue(), and anonymous_namespace{DateTruncate.cpp}::EraTime::make().
|
inline |
Definition at line 114 of file ExtractFromTime.h.
Referenced by datetrunc_century(), datetrunc_day(), datetrunc_decade(), datetrunc_hour(), datetrunc_millennium(), datetrunc_minute(), datetrunc_month(), datetrunc_quarter(), datetrunc_quarterday(), datetrunc_week(), datetrunc_year(), extract_dateepoch(), extract_day(), extract_day_of_year(), extract_dow(), extract_hour(), extract_isodow(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_month(), extract_nanosecond(), extract_quarter(), extract_quarterday(), extract_second(), extract_week(), ExtractTimeFromHPTimestamp(), ExtractTimeFromLPTimestamp(), and DateTimeTranslator::getDateTruncConstantValue().
constexpr unsigned JANMAR = 31 + 28 |
Definition at line 75 of file ExtractFromTime.h.
Referenced by datetrunc_decade(), datetrunc_quarter(), datetrunc_year(), and extract_day_of_year().
|
static |
Definition at line 65 of file ExtractFromTime.h.
|
static |
Definition at line 63 of file ExtractFromTime.h.
|
static |
Definition at line 57 of file ExtractFromTime.h.
|
static |
Definition at line 55 of file ExtractFromTime.h.
Referenced by datetrunc_century(), datetrunc_decade(), datetrunc_millennium(), datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_day(), extract_day_of_year(), extract_month(), extract_quarter(), extract_week(), extract_year(), and anonymous_namespace{DateTruncate.cpp}::EraTime::make().
|
static |
Definition at line 59 of file ExtractFromTime.h.
|
static |
Definition at line 37 of file ExtractFromTime.h.
Referenced by extract_dow(), and extract_isodow().
|
static |
Definition at line 61 of file ExtractFromTime.h.
|
static |
Definition at line 49 of file ExtractFromTime.h.
Referenced by datetrunc_century(), datetrunc_decade(), datetrunc_millennium(), datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_day(), extract_day_of_year(), extract_month(), extract_quarter(), extract_week(), extract_year(), and anonymous_namespace{DateTruncate.cpp}::EraTime::make().
|
static |
Definition at line 53 of file ExtractFromTime.h.
|
static |
Definition at line 51 of file ExtractFromTime.h.
|
static |
Definition at line 70 of file ExtractFromTime.h.
Referenced by datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_month(), extract_month_fast(), extract_quarter(), extract_quarter_fast(), extract_year(), and extract_year_fast().
|
static |
Definition at line 33 of file ExtractFromTime.h.
|
static |
Definition at line 26 of file ExtractFromTime.h.
Referenced by DateDiff(), extract_microsecond(), DateTimeUtils::get_dateadd_high_precision_adjusted_scale(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), DateTimeUtils::get_timestamp_precision_scale(), Timestamp::getMicroseconds(), DayTimeInterval::numStepsBetween(), and Timestamp::truncateToMilliseconds().
|
static |
Definition at line 30 of file ExtractFromTime.h.
Referenced by anonymous_namespace{RelAlgTranslator.cpp}::determineTimeUnit().
|
static |
Definition at line 29 of file ExtractFromTime.h.
Referenced by anonymous_namespace{RelAlgTranslator.cpp}::determineTimeUnit(), and anonymous_namespace{RelAlgTranslator.cpp}::determineTimeValMultiplierForTimeType().
|
static |
Definition at line 28 of file ExtractFromTime.h.
Referenced by anonymous_namespace{RelAlgTranslator.cpp}::determineTimeUnit(), and anonymous_namespace{RelAlgTranslator.cpp}::determineTimeValMultiplierForTimeType().
|
static |
Definition at line 27 of file ExtractFromTime.h.
Referenced by anonymous_namespace{ArrowResultSetConverter.cpp}::appendToColumnBuilder(), DateDiff(), anonymous_namespace{RelAlgTranslator.cpp}::determineTimeUnit(), anonymous_namespace{RelAlgTranslator.cpp}::determineTimeValMultiplierForTimeType(), extract_millisecond(), DateTimeUtils::get_dateadd_high_precision_adjusted_scale(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), DateTimeUtils::get_timestamp_precision_scale(), Timestamp::getMilliseconds(), and Timestamp::truncateToMicroseconds().
|
static |
Definition at line 32 of file ExtractFromTime.h.
|
static |
Definition at line 40 of file ExtractFromTime.h.
|
static |
Definition at line 38 of file ExtractFromTime.h.
Referenced by datetrunc_month(), and extract_month_fast().
|
static |
Definition at line 25 of file ExtractFromTime.h.
Referenced by DateDiff(), extract_nanosecond(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DateTimeUtils::get_extract_timestamp_precision_scale(), DateTimeUtils::get_timestamp_precision_scale(), Timestamp::getDay(), Timestamp::getHours(), Timestamp::getMicroseconds(), Timestamp::getMilliseconds(), Timestamp::getMinutes(), Timestamp::getMonth(), Timestamp::getSeconds(), Timestamp::getYear(), Timestamp::truncateToDay(), Timestamp::truncateToHours(), Timestamp::truncateToMinutes(), Timestamp::truncateToMonth(), Timestamp::truncateToSeconds(), and Timestamp::truncateToYear().
|
static |
Definition at line 68 of file ExtractFromTime.h.
Referenced by datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 67 of file ExtractFromTime.h.
Referenced by datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 71 of file ExtractFromTime.h.
Referenced by datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 35 of file ExtractFromTime.h.
Referenced by foreign_storage::BaseDateBoundsValidator< T, is_in_seconds >::checkBounds(), Executor::codegenWindowNavigationFunctionOnFrame(), DateDiff(), datetrunc_century(), datetrunc_day(), datetrunc_decade(), datetrunc_millennium(), datetrunc_month(), datetrunc_quarter(), datetrunc_week(), datetrunc_year(), DateTruncateHighPrecisionToDate(), foreign_storage::ParquetDateInSecondsEncoder< NullType >::encodeAndCopy(), extract_dateepoch(), extract_day(), extract_day_of_year(), extract_dow(), extract_hour(), extract_isodow(), extract_month(), extract_quarter(), extract_quarter_fast(), extract_quarterday(), extract_week(), extract_year(), ExtractTimeFromHPTimestamp(), ExtractTimeFromLPTimestamp(), fixed_width_date_decode(), fixed_width_date_encode(), fixed_width_small_date_decode(), DateConverters::get_epoch_days_from_seconds(), DateConverters::get_epoch_seconds_from_days(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), foreign_storage::BaseDateBoundsValidator< T, is_in_seconds >::getMinMaxBoundsAsStrings(), anonymous_namespace{DateTruncate.cpp}::EraTime::make(), and foreign_storage::ParquetDateInSecondsEncoder< NullType >::validate().
|
static |
Definition at line 39 of file ExtractFromTime.h.
|
static |
Definition at line 34 of file ExtractFromTime.h.
Referenced by DateDiff(), datetrunc_hour(), anonymous_namespace{RelAlgTranslator.cpp}::determineTimeValMultiplierForTimeType(), extract_hour(), and extract_minute().
|
static |
Definition at line 31 of file ExtractFromTime.h.
Referenced by DateDiff(), datetrunc_minute(), anonymous_namespace{RelAlgTranslator.cpp}::determineTimeValMultiplierForTimeType(), extract_microsecond(), extract_millisecond(), extract_minute(), extract_nanosecond(), and extract_second().
|
static |
Definition at line 36 of file ExtractFromTime.h.
Referenced by datetrunc_quarterday(), and extract_quarterday().
|
static |
Definition at line 69 of file ExtractFromTime.h.
Referenced by datetrunc_month(), datetrunc_quarter(), datetrunc_year(), extract_month_fast(), extract_quarter_fast(), and extract_year_fast().
|
static |
Definition at line 42 of file ExtractFromTime.h.
constexpr unsigned MARJAN = 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 |
Definition at line 74 of file ExtractFromTime.h.
Referenced by datetrunc_century(), datetrunc_decade(), datetrunc_millennium(), datetrunc_year(), extract_day_of_year(), extract_year(), and anonymous_namespace{ExtractFromTime.cpp}::week_start_from_yoe().