This is an automated email from the ASF dual-hosted git repository. kassiez pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new c85765f25b5 [update] Delete date floor function of 2.0 (#1704) c85765f25b5 is described below commit c85765f25b58cb4339e792e2163624ededebad56 Author: KassieZ <139741991+kass...@users.noreply.github.com> AuthorDate: Fri Jan 3 14:35:01 2025 +0800 [update] Delete date floor function of 2.0 (#1704) ## Versions - [ ] dev - [ ] 3.0 - [ ] 2.1 - [x] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built --- .../date-time-functions/date-floor.md | 114 --------------------- .../date-time-functions/date-floor.md | 114 --------------------- versioned_sidebars/version-2.0-sidebars.json | 1 - 3 files changed, 229 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md deleted file mode 100644 index 7ec908e1776..00000000000 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -{ - "title": "date_floor", - "language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## date_floor -### description -#### Syntax - -`DATETIME DATE_FLOOR(DATETIME datetime, INTERVAL period type)` - - -将日期转化为指定的时间间隔周期的最近下取整时刻。 - -datetime 参数是合法的日期表达式。 - -period 参数是指定每个周期有多少个单位组成,开始的时间起点为0001-01-01T00:00:00. - -type 参数可以是下列值:YEAR, MONTH, DAY, HOUR, MINUTE, SECOND. - -### example - -``` -mysql>select date_floor("0001-01-01 00:00:16",interval 5 second); -+---------------------------------------------------------------+ -| second_floor('0001-01-01 00:00:16', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 0001-01-01 00:00:15 | -+---------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("0001-01-01 00:00:18",interval 5 second); -+---------------------------------------------------------------+ -| second_floor('0001-01-01 00:00:18', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 0001-01-01 00:00:15 | -+---------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 minute); -+---------------------------------------------------------------+ -| minute_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 2023-07-13 22:25:00 | -+---------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 hour); -+-------------------------------------------------------------+ -| hour_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+-------------------------------------------------------------+ -| 2023-07-13 18:00:00 | -+-------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 day); -+------------------------------------------------------------+ -| day_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+------------------------------------------------------------+ -| 2023-07-10 00:00:00 | -+------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 month); -+--------------------------------------------------------------+ -| month_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+--------------------------------------------------------------+ -| 2023-07-01 00:00:00 | -+--------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 year); -+-------------------------------------------------------------+ -| year_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+-------------------------------------------------------------+ -| 2021-01-01 00:00:00 | -+-------------------------------------------------------------+ - -``` - -### keywords - - DATE_FLOOR,DATE,FLOOR - -### Best Practice - -还可参阅: -- [second_ceil](./second_ceil) -- [minute_ceil](./minute_ceil) -- [hour_ceil](./hour_ceil) -- [day_ceil](./day_ceil) -- [month_ceil](./month_ceil) -- [year_ceil](./year_ceil) diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md b/versioned_docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md deleted file mode 100644 index 565c72439be..00000000000 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/date-time-functions/date-floor.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -{ - "title": "date_floor", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -## date_floor -### Description -**Syntax** - -`DATETIME DATE_FLOOR(DATETIME datetime, INTERVAL period type)` - - -Converts a date to the nearest rounding down time of a specified time interval period. - -The datetime parameter is a valid date expression. - -The period parameter specifies how many units each cycle consists of, starting from 0001-01-01T00:00:00 - -Type: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND. - -### Example - -``` -mysql>select date_floor("0001-01-01 00:00:16",interval 5 second); -+---------------------------------------------------------------+ -| second_floor('0001-01-01 00:00:16', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 0001-01-01 00:00:15 | -+---------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("0001-01-01 00:00:18",interval 5 second); -+---------------------------------------------------------------+ -| second_floor('0001-01-01 00:00:18', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 0001-01-01 00:00:15 | -+---------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 minute); -+---------------------------------------------------------------+ -| minute_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+---------------------------------------------------------------+ -| 2023-07-13 22:25:00 | -+---------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 hour); -+-------------------------------------------------------------+ -| hour_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+-------------------------------------------------------------+ -| 2023-07-13 18:00:00 | -+-------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 day); -+------------------------------------------------------------+ -| day_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+------------------------------------------------------------+ -| 2023-07-10 00:00:00 | -+------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 month); -+--------------------------------------------------------------+ -| month_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+--------------------------------------------------------------+ -| 2023-07-01 00:00:00 | -+--------------------------------------------------------------+ -1 row in set (0.01 sec) - -mysql>select date_floor("2023-07-13 22:28:18",interval 5 year); -+-------------------------------------------------------------+ -| year_floor('2023-07-13 22:28:18', 5, '0001-01-01 00:00:00') | -+-------------------------------------------------------------+ -| 2021-01-01 00:00:00 | -+-------------------------------------------------------------+ - -``` - -### Keywords - - DATE_FLOOR,DATE,FLOOR - -### Best Practices - -See also -- [second_floor](./second_floor) -- [minute_floor](./minute_floor) -- [hour_floor](./hour_floor) -- [day_floor](./day_floor) -- [month_floor](./month_floor) -- [year_floor](./year_floor) diff --git a/versioned_sidebars/version-2.0-sidebars.json b/versioned_sidebars/version-2.0-sidebars.json index aedd7b9e34c..e38afeb6119 100644 --- a/versioned_sidebars/version-2.0-sidebars.json +++ b/versioned_sidebars/version-2.0-sidebars.json @@ -735,7 +735,6 @@ "sql-manual/sql-functions/date-time-functions/date-trunc", "sql-manual/sql-functions/date-time-functions/date-format", "sql-manual/sql-functions/date-time-functions/datediff", - "sql-manual/sql-functions/date-time-functions/date-floor", "sql-manual/sql-functions/date-time-functions/second-floor", "sql-manual/sql-functions/date-time-functions/minute-floor", "sql-manual/sql-functions/date-time-functions/hour-floor", --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org