58 KiB
QA-SRS010 ClickHouse DateTime64 Extended Range
Software Requirements Specification
Table of Contents
- 1 Revision History
- 2 Introduction
- 3 Terminology
- 3.1 SRS
- 3.2 Normal Date Range
- 3.3 Extended Date Range
- 4 Requirements
- 4.1 Generic
- 4.1.0.1 RQ.SRS-010.DateTime64.ExtendedRange
- 4.1.0.2 RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.Start
- 4.1.0.3 RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.Start.BeforeEpochForTimeZone
- 4.1.0.4 RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.End
- 4.1.0.5 RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.End.AfterEpochForTimeZone
- 4.1.0.6 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions
- 4.1.0.7 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions
- 4.1.0.8 RQ.SRS-010.DateTime64.ExtendedRange.TimeZones
- 4.1.0.9 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime
- 4.1.0.10 RQ.SRS-010.DateTime64.ExtendedRange.Comparison
- 4.1.0.11 RQ.SRS-010.DateTime64.ExtendedRange.SpecificTimestamps
- 4.2 Specific
- 4.2.0.1 RQ.SRS-010.DateTime64.ExtendedRange.Start
- 4.2.0.2 RQ.SRS-010.DateTime64.ExtendedRange.Start.BeforeEpochForTimeZone
- 4.2.0.3 RQ.SRS-010.DateTime64.ExtendedRange.End
- 4.2.0.4 RQ.SRS-010.DateTime64.ExtendedRange.End.AfterEpochForTimeZone
- 4.2.0.5 Non-Existent Time
- 4.2.0.5.1 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.InvalidDate
- 4.2.0.5.2 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.InvalidTime
- 4.2.0.5.3 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.TimeZoneSwitch
- 4.2.0.5.4 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.DaylightSavingTime
- 4.2.0.5.5 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.DaylightSavingTime.Disappeared
- 4.2.0.5.6 RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.LeapSeconds
- 4.2.0.6 Dates And Times Functions
- 4.2.0.6.1 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toTimeZone
- 4.2.0.6.2 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYear
- 4.2.0.6.3 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toQuarter
- 4.2.0.6.4 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMonth
- 4.2.0.6.5 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfYear
- 4.2.0.6.6 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfMonth
- 4.2.0.6.7 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfWeek
- 4.2.0.6.8 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toHour
- 4.2.0.6.9 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMinute
- 4.2.0.6.10 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toSecond
- 4.2.0.6.11 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toUnixTimestamp
- 4.2.0.6.12 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfYear
- 4.2.0.6.13 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfISOYear
- 4.2.0.6.14 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfQuarter
- 4.2.0.6.15 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfMonth
- 4.2.0.6.16 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMonday
- 4.2.0.6.17 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfWeek
- 4.2.0.6.18 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfDay
- 4.2.0.6.19 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfHour
- 4.2.0.6.20 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfMinute
- 4.2.0.6.21 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfSecond
- 4.2.0.6.22 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfFiveMinute
- 4.2.0.6.23 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfTenMinutes
- 4.2.0.6.24 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfFifteenMinutes
- 4.2.0.6.25 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfInterval
- 4.2.0.6.26 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toTime
- 4.2.0.6.27 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeYearNum
- 4.2.0.6.28 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeQuarterNum
- 4.2.0.6.29 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeMonthNum
- 4.2.0.6.30 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeWeekNum
- 4.2.0.6.31 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeDayNum
- 4.2.0.6.32 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeHourNum
- 4.2.0.6.33 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeMinuteNum
- 4.2.0.6.34 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeSecondNum
- 4.2.0.6.35 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toISOYear
- 4.2.0.6.36 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toISOWeek
- 4.2.0.6.37 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toWeek
- 4.2.0.6.38 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYearWeek
- 4.2.0.6.39 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.now
- 4.2.0.6.40 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.today
- 4.2.0.6.41 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.yesterday
- 4.2.0.6.42 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.timeSlot
- 4.2.0.6.43 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMM
- 4.2.0.6.44 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMMDD
- 4.2.0.6.45 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMMDDhhmmss
- 4.2.0.6.46 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addYears
- 4.2.0.6.47 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addMonths
- 4.2.0.6.48 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addWeeks
- 4.2.0.6.49 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addDays
- 4.2.0.6.50 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addHours
- 4.2.0.6.51 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addMinutes
- 4.2.0.6.52 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addSeconds
- 4.2.0.6.53 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addQuarters
- 4.2.0.6.54 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractYears
- 4.2.0.6.55 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractMonths
- 4.2.0.6.56 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractWeeks
- 4.2.0.6.57 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractDays
- 4.2.0.6.58 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractHours
- 4.2.0.6.59 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractMinutes
- 4.2.0.6.60 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractSeconds
- 4.2.0.6.61 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractQuarters
- 4.2.0.6.62 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.dateDiff
- 4.2.0.6.63 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.timeSlots
- 4.2.0.6.64 RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.formatDateTime
- 4.2.1 Type Conversion Functions
- 4.2.1.6.1 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toInt(8|16|32|64|128|256)
- 4.2.1.6.2 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUInt(8|16|32|64|256)
- 4.2.1.6.3 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toFloat(32|64)
- 4.2.1.6.4 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDate
- 4.2.1.6.5 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime
- 4.2.1.6.6 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime64
- 4.2.1.6.7 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime64.FromString.MissingTime
- 4.2.1.6.8 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDecimal(32|64|128|256)
- 4.2.1.6.9 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toString
- 4.2.1.6.10 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.CAST(x,T)
- 4.2.1.6.11 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Milli
- 4.2.1.6.12 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Micro
- 4.2.1.6.13 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Nano
- 4.2.1.6.14 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Milli
- 4.2.1.6.15 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Micro
- 4.2.1.6.16 RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Nano
- 4.1 Generic
- 5 References
Revision History
This document is stored in an electronic form using Git source control management software hosted in a GitHub Repository. All the updates are tracked using the Revision History.
Introduction
This document will cover requirements to support extended range for the DateTime64 data type that is outside the normal 1970 (1970-01-02 00:00:00 UTC) to 2105 (2105-12-31 23:59:59.99999 UTC) date range.
Terminology
SRS
Software Requirements Specification
Normal Date Range
1970 1970-01-02T00:00:00.000000
to 2105 2105-12-31T23:59:59.99999
Extended Date Range
1925 1925-01-01T00:00:00.000000
to 2238 2238-12-31 23:59:59.99999
Requirements
Generic
RQ.SRS-010.DateTime64.ExtendedRange
version: 1.0
ClickHouse SHALL support extended range for the DateTime64 data type that includes dates from the year 1925 to 2238.
RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.Start
version: 1.0
ClickHouse SHALL support proper time handling around the normal date range that starts at 1970-01-01 00:00:00.000
expressed using the ISO 8601 format.
RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.Start.BeforeEpochForTimeZone
version: 1.0
ClickHouse SHALL support proper time handling around the start of the normal date range when this time for the time zone is before the start of the normal date range.
RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.End
version: 1.0
ClickHouse SHALL support proper time handling around the normal date range that ends at 2105-12-31T23:59:59.99999
expressed using the ISO 8601 format.
RQ.SRS-010.DateTime64.ExtendedRange.NormalRange.End.AfterEpochForTimeZone
version: 1.0
ClickHouse SHALL support proper time handling around the end of the normal date range when this time for the time zone is after the end of the normal date range.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions
version: 1.0
ClickHouse SHALL support proper conversion to and from DateTime64 data type from other data types.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions
version: 1.0
ClickHouse SHALL support correct operation of the Dates and Times Functions with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.TimeZones
version: 1.0
ClickHouse SHALL support correct operation with the DateTime64 extended range data type when combined with a supported time zone.
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime
version: 1.0
ClickHouse SHALL support proper handling of non-existent times when using DateTime64 extended range data type.
RQ.SRS-010.DateTime64.ExtendedRange.Comparison
version: 1.0
ClickHouse SHALL support proper handling of time comparison when using DateTime64 extended range data type.
For example, SELECT toDateTime64('2019-05-05 20:20:12.050', 3) < now()
.
RQ.SRS-010.DateTime64.ExtendedRange.SpecificTimestamps
version: 1.0
ClickHouse SHALL properly work with the following timestamps in all supported timezones:
[9961200,73476000,325666800,354675600,370400400,386125200,388566010,401850000,417574811,496803600,528253200,624423614,636516015,671011200,717555600,752047218,859683600,922582800,1018173600,1035705600,1143334800,1162105223,1174784400,1194156000,1206838823,1224982823,1236495624,1319936400,1319936424,1425798025,1459040400,1509872400,2090451627,2140668000]
Specific
RQ.SRS-010.DateTime64.ExtendedRange.Start
version: 1.0
ClickHouse SHALL support extended range for the DateTime64 data type that starts at 1925-01-01T00:00:00.000000
expressed using the ISO 8601 format.
RQ.SRS-010.DateTime64.ExtendedRange.Start.BeforeEpochForTimeZone
version: 1.0
ClickHouse SHALL support proper time handling around the start of the extended date range when this time for the time zone is before the start of the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.End
version: 1.0
ClickHouse SHALL support extended range for the DateTime64 data type that ends at 2238-12-31T23:59:59.999999
expressed using the ISO 8601 format.
RQ.SRS-010.DateTime64.ExtendedRange.End.AfterEpochForTimeZone
version: 1.0
ClickHouse SHALL support proper time handling around the end of the extended date range when this time for the time zone is after the end of the extended date range.
Non-Existent Time
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.InvalidDate
version: 1.0
ClickHouse SHALL support proper handling of invalid dates when using DateTime64 extended range data type, such as:
YYYY-04-31, YYYY-06-31, YYYY-09-31, YYYY-11-31
1990-02-30 00:00:02
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.InvalidTime
version: 1.0
ClickHouse SHALL support proper handling of invalid time for a timezone when using DateTime64 extended range data type, for example,
2002-04-07 02:30:00
never happened at all in the US/Eastern timezone (Stuart Bishop: pytz library)
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.TimeZoneSwitch
version: 1.0
ClickHouse SHALL support proper handling of invalid time when using DateTime64 extended range data type when the invalid time is caused when countries switch timezone definitions with no daylight savings time switch Stuart Bishop: pytz library.
For example, in 1915 Warsaw switched from Warsaw time to Central European time with no daylight savings transition. So at the stroke of midnight on August 5th 1915 the clocks were wound back 24 minutes creating an ambiguous time period that cannot be specified without referring to the timezone abbreviation or the actual UTC offset. In this case midnight happened twice, neither time during a daylight saving time period. pytz handles this transition by treating the ambiguous period before the switch as daylight savings time, and the ambiguous period after as standard time.
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.DaylightSavingTime
version: 1.0
ClickHouse SHALL support proper handling of invalid time when using DateTime64 extended range data type when for a given timezone time switches from standard to daylight saving.
For example, in the US/Eastern timezone on the last Sunday morning in October, the following sequence happens:
01:00 EDT occurs 1 hour later, instead of 2:00am the clock is turned back 1 hour and 01:00 happens again (this time 01:00 EST) In fact, every instant between 01:00 and 02:00 occurs twice. Stuart Bishop: pytz library
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.DaylightSavingTime.Disappeared
version: 1.0
ClickHouse SHALL support proper handling of invalid time when using DateTime64 extended range data type for a given timezone when transition from the standard to daylight saving time causes an hour to disappear.
Expected behavior: if DateTime64 initialized by a skipped time value, it is being treated as DST and resulting value will be an hour earlier, e.g. SELECT toDateTime64('2020-03-08 02:34:00', 0, 'America/Denver')
returns 2020-03-08 01:34:00
.
RQ.SRS-010.DateTime64.ExtendedRange.NonExistentTime.LeapSeconds
version: 1.0
ClickHouse SHALL support proper handling of leap seconds adjustments when using DateTime64 extended range data type.
Dates And Times Functions
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toTimeZone
version: 1.0
ClickHouse SHALL support correct operation of the toTimeZone function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYear
version: 1.0
ClickHouse SHALL support correct operation of the toYear function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toQuarter
version: 1.0
ClickHouse SHALL support correct operation of the toQuarter function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMonth
version: 1.0
ClickHouse SHALL support correct operation of the toMonth function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfYear
version: 1.0
ClickHouse SHALL support correct operation of the toDayOfYear function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfMonth
version: 1.0
ClickHouse SHALL support correct operation of the toDayOfMonth function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toDayOfWeek
version: 1.0
ClickHouse SHALL support correct operation of the toDayOfWeek function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toHour
version: 1.0
ClickHouse SHALL support correct operation of the toHour function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMinute
version: 1.0
ClickHouse SHALL support correct operation of the toMinute function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toSecond
version: 1.0
ClickHouse SHALL support correct operation of the toSecond function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toUnixTimestamp
version: 1.0
ClickHouse SHALL support correct operation of the toUnitTimestamp
function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
Timestamp value expected to be negative when DateTime64 value is prior to 1970-01-01
and positine otherwise.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfYear
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfYear function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfISOYear
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfISOYear function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfQuarter
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfQuarter function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfMonth
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfMonth function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toMonday
version: 1.0
ClickHouse SHALL support correct operation of the toMonday function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfWeek
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfWeek function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfDay
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfDay function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfHour
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfHour function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfMinute
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfMinute function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfSecond
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfSecond function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfFiveMinute
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfFiveMinute function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfTenMinutes
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfTenMinutes function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfFifteenMinutes
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfFifteenMinutes function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toStartOfInterval
version: 1.0
ClickHouse SHALL support correct operation of the toStartOfInterval function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range. More detailed description can be found here.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toTime
version: 1.0
ClickHouse SHALL support correct operation of the toTime function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeYearNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeYearNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeQuarterNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeQuarterNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeMonthNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeMonthNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeWeekNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeWeekNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeDayNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeDayNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeHourNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeHourNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeMinuteNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeMinuteNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toRelativeSecondNum
version: 1.0
ClickHouse SHALL support correct operation of the toRelativeSecondNum function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toISOYear
version: 1.0
ClickHouse SHALL support correct operation of the toISOYear function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toISOWeek
version: 1.0
ClickHouse SHALL support correct operation of the toISOWeek function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toWeek
version: 1.0
ClickHouse SHALL support correct operation of the toWeek function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYearWeek
version: 1.0
ClickHouse SHALL support correct operation of the toYearWeek function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.now
version: 1.0
ClickHouse SHALL support conversion of output from the now function to the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.today
version: 1.0
ClickHouse SHALL support conversion of output from the today function to the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.yesterday
version: 1.0
ClickHouse SHALL support conversion of output from the yesterday function to the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.timeSlot
version: 1.0
ClickHouse SHALL support conversion of output from the timeSlot function to the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMM
version: 1.0
ClickHouse SHALL support correct operation of the toYYYYMM function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMMDD
version: 1.0
ClickHouse SHALL support correct operation of the toYYYYMMDD function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.toYYYYMMDDhhmmss
version: 1.0
ClickHouse SHALL support correct operation of the toYYYYMMDDhhmmss function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addYears
version: 1.0
ClickHouse SHALL support correct operation of the addYears function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addMonths
version: 1.0
ClickHouse SHALL support correct operation of the addMonths function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addWeeks
version: 1.0
ClickHouse SHALL support correct operation of the addWeeks function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addDays
version: 1.0
ClickHouse SHALL support correct operation of the addDays function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addHours
version: 1.0
ClickHouse SHALL support correct operation of the addHours function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addMinutes
version: 1.0
ClickHouse SHALL support correct operation of the addMinutes function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addSeconds
version: 1.0
ClickHouse SHALL support correct operation of the addSeconds function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.addQuarters
version: 1.0
ClickHouse SHALL support correct operation of the addQuarters function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractYears
version: 1.0
ClickHouse SHALL support correct operation of the subtractYears function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractMonths
version: 1.0
ClickHouse SHALL support correct operation of the subtractMonths function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractWeeks
version: 1.0
ClickHouse SHALL support correct operation of the subtractWeeks function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractDays
version: 1.0
ClickHouse SHALL support correct operation of the subtractDays function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractHours
version: 1.0
ClickHouse SHALL support correct operation of the subtractHours function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractMinutes
version: 1.0
ClickHouse SHALL support correct operation of the subtractMinutes function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractSeconds
version: 1.0
ClickHouse SHALL support correct operation of the subtractSeconds function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.subtractQuarters
version: 1.0
ClickHouse SHALL support correct operation of the subtractQuarters function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.dateDiff
version: 1.0
ClickHouse SHALL support correct operation of the dateDiff function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.timeSlots
version: 1.0
ClickHouse SHALL support correct operation of the timeSlots function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.DatesAndTimesFunctions.formatDateTime
version: 1.0
ClickHouse SHALL support correct operation of the formatDateTime function used with the DateTime64 data type when it stores dates within the normal date range and the extended date range.
Type Conversion Functions
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toInt(8|16|32|64|128|256)
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to integer types using toInt(8|16|32|64|128|256) functions.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUInt(8|16|32|64|256)
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to unsigned integer types using toUInt(8|16|32|64|256) functions.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toFloat(32|64)
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to float types using toFloat(32|64) functions.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDate
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range to the Date type using the toDate function. This function is ONLY supposed to work in NORMAL RANGE.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to the DateTime type using the toDateTime function. This function is ONLY supposed to work in NORMAL RANGE.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime64
version: 1.0
ClickHouse SHALL support correct conversion from the data types supported by the toDateTime64 function to the DateTime64 data type when it stores dates within the normal date range and the extended date range.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDateTime64.FromString.MissingTime
version: 1.0
ClickHouse SHALL support correct conversion from the String
data type to the DateTime64 data type
when value of the string is missing the hh:mm-ss.sss
part.
For example, toDateTime64('2020-01-01', 3)
.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toDecimal(32|64|128|256)
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to Decimal types using toDecimal(32|64|128|256) functions.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toString
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to the String type using the toString function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.CAST(x,T)
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to one of the supported data type using the CAST(x,T) function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Milli
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to the Int64 type using the toUnixTimestamp64Milli function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Micro
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to the Int64 type using the toUnixTimestamp64Micro function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.toUnixTimestamp64Nano
version: 1.0
ClickHouse SHALL support correct conversion of the DateTime64 data type when it stores dates within the normal date range and the extended date range to the Int64 type using the toUnixTimestamp64Nano function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Milli
version: 1.0
ClickHouse SHALL support correct conversion from the Int64 type to the DateTime64 data type when it stores dates within the normal date range and the extended date range using the fromUnixTimestamp64Milli function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Micro
version: 1.0
ClickHouse SHALL support correct conversion from the Int64 type to the DateTime64 data type when it stores dates within the normal date range and the extended date range using the fromUnixTimestamp64Micro function.
RQ.SRS-010.DateTime64.ExtendedRange.TypeConversionFunctions.fromUnixTimestamp64Nano
version: 1.0
ClickHouse SHALL support correct conversion from the Int64 type to the DateTime64 data type when it stores dates within the normal date range and the extended date range using the fromUnixTimestamp64Nano function.
References
- DateTime64: https://clickhouse.tech/docs/en/sql-reference/data-types/datetime64/
- ISO 8601 format: https://en.wikipedia.org/wiki/ISO_8601
- ClickHouse: https://clickhouse.tech
- GitHub Repository: https://github.com/ClickHouse/ClickHouse/blob/master/tests/testflows/datetime64_extended_range/requirements/requirements.md
- Revision History: https://github.com/ClickHouse/ClickHouse/commits/master/tests/testflows/datetime64_extended_range/requirements/requirements.md
- Git: https://git-scm.com/