mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
109 lines
3.7 KiB
XML
109 lines
3.7 KiB
XML
<test>
|
|
<name>Functions for working with date and time</name>
|
|
|
|
<type>once</type>
|
|
|
|
<tags>
|
|
<tag>long</tag>
|
|
</tags>
|
|
|
|
<stop_conditions>
|
|
<any_of>
|
|
<average_speed_not_changing_for_ms>10000</average_speed_not_changing_for_ms>
|
|
<total_time_ms>1000</total_time_ms>
|
|
</any_of>
|
|
</stop_conditions>
|
|
|
|
<metrics>
|
|
<max_rows_per_second />
|
|
<max_bytes_per_second />
|
|
<avg_rows_per_second />
|
|
<avg_bytes_per_second />
|
|
</metrics>
|
|
|
|
<substitutions>
|
|
<substitution>
|
|
<name>datetime_transform</name>
|
|
<values>
|
|
<value>toSecond</value>
|
|
<value>toMinute</value>
|
|
<value>toHour</value>
|
|
<value>toDayOfWeek</value>
|
|
<value>toDayOfMonth</value>
|
|
<value>toDayOfYear</value>
|
|
<value>toMonth</value>
|
|
<value>toQuarter</value>
|
|
<value>toYear</value>
|
|
<value>toISOWeek</value>
|
|
<value>toISOYear</value>
|
|
|
|
<value>toStartOfMinute</value>
|
|
<value>toStartOfFiveMinute</value>
|
|
<value>toStartOfFifteenMinutes</value>
|
|
<value>toStartOfHour</value>
|
|
<value>toStartOfDay</value>
|
|
<value>toDate</value>
|
|
<value>toMonday</value>
|
|
<value>toStartOfMonth</value>
|
|
<value>toStartOfQuarter</value>
|
|
<value>toStartOfYear</value>
|
|
<value>toStartOfISOYear</value>
|
|
|
|
<value>toTime</value>
|
|
|
|
<value>toRelativeYearNum</value>
|
|
<value>toRelativeMonthNum</value>
|
|
<value>toRelativeWeekNum</value>
|
|
<value>toRelativeDayNum</value>
|
|
<value>toRelativeHourNum</value>
|
|
<value>toRelativeMinuteNum</value>
|
|
<value>toRelativeSecondNum</value>
|
|
|
|
<value>toYYYYMM</value>
|
|
<value>toYYYYMMDD</value>
|
|
<value>toYYYYMMDDhhmmss</value>
|
|
</values>
|
|
</substitution>
|
|
<substitution>
|
|
<name>date_transform</name>
|
|
<values>
|
|
<value>toDayOfWeek</value>
|
|
<value>toDayOfMonth</value>
|
|
<value>toDayOfYear</value>
|
|
<value>toMonth</value>
|
|
<value>toQuarter</value>
|
|
<value>toYear</value>
|
|
<value>toISOWeek</value>
|
|
<value>toISOYear</value>
|
|
|
|
<value>toDate</value>
|
|
<value>toMonday</value>
|
|
<value>toStartOfMonth</value>
|
|
<value>toStartOfQuarter</value>
|
|
<value>toStartOfYear</value>
|
|
<value>toStartOfISOYear</value>
|
|
|
|
<value>toRelativeYearNum</value>
|
|
<value>toRelativeMonthNum</value>
|
|
<value>toRelativeWeekNum</value>
|
|
<value>toRelativeDayNum</value>
|
|
|
|
<value>toYYYYMM</value>
|
|
<value>toYYYYMMDD</value>
|
|
<value>toYYYYMMDDhhmmss</value>
|
|
</values>
|
|
</substitution>
|
|
<substitution>
|
|
<name>time_zone</name>
|
|
<values>
|
|
<value>UTC</value>
|
|
<value>Europe/Moscow</value>
|
|
<value>Asia/Kolkata</value>
|
|
</values>
|
|
</substitution>
|
|
</substitutions>
|
|
|
|
<query>SELECT count() FROM system.numbers WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {datetime_transform}(t, '{time_zone}'))</query>
|
|
<query>SELECT count() FROM system.numbers WHERE NOT ignore(toDate('2017-01-01') + number % 1000 + rand() % 10 AS t, {date_transform}(t))</query>
|
|
</test>
|