From 6c94632d47f9c8b123507da49da94b6b0cf727a0 Mon Sep 17 00:00:00 2001 From: Victor Krasnov Date: Mon, 29 May 2023 22:10:34 +0000 Subject: [PATCH] Deprive toStartOfWeek and toLastDayOfWeek functions of in-source documentation --- src/Functions/toCustomWeek.cpp | 26 ++----------------- ...new_functions_must_be_documented.reference | 2 ++ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/Functions/toCustomWeek.cpp b/src/Functions/toCustomWeek.cpp index 0dbd60b3eff..98e7aaf1d6b 100644 --- a/src/Functions/toCustomWeek.cpp +++ b/src/Functions/toCustomWeek.cpp @@ -17,30 +17,8 @@ REGISTER_FUNCTION(ToCustomWeek) { factory.registerFunction(); factory.registerFunction(); - - factory.registerFunction(FunctionDocumentation{.description=R"( -Rounds a date or date with time down to the nearest Sunday or Monday. Returns the date. -Syntax: toStartOfWeek(t[, mode[, timezone]]) -The mode argument works exactly like the mode argument in function `toWeek()`. If no mode is specified, mode is assumed as 0. - -Example: -[example:typical] -)", - .examples{ - {"typical", "SELECT toStartOfWeek(today(), 1);", ""}}, - .categories{"Dates and Times"}}, FunctionFactory::CaseSensitive); - - factory.registerFunction(FunctionDocumentation{.description=R"( -Rounds a date or date with time up to the nearest Saturday or Sunday. Returns the date. -Syntax: toLastDayOfWeek(t[, mode[, timezone]]) -The mode argument works exactly like the mode argument in function `toWeek()`. If no mode is specified, mode is assumed as 0. - -Example: -[example:typical] -)", - .examples{ - {"typical", "SELECT toLastDayOfWeek(today(), 1);", ""}}, - .categories{"Dates and Times"}}, FunctionFactory::CaseSensitive); + factory.registerFunction(); + factory.registerFunction(); /// Compatibility aliases for mysql. factory.registerAlias("week", "toWeek", FunctionFactory::CaseInsensitive); diff --git a/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference b/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference index eae36604845..bf43288fe1d 100644 --- a/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference +++ b/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference @@ -784,6 +784,7 @@ toIntervalWeek toIntervalYear toJSONString toLastDayOfMonth +toLastDayOfWeek toLowCardinality toMinute toModifiedJulianDay @@ -815,6 +816,7 @@ toStartOfNanosecond toStartOfQuarter toStartOfSecond toStartOfTenMinutes +toStartOfWeek toStartOfYear toString toStringCutToZero