From 70c95c74103c266441cd10c161a6b7ce0ac12460 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 15 Sep 2023 11:21:49 +0000 Subject: [PATCH] + minimal in-source docs --- src/Functions/makeDate.cpp | 41 +++++++++++++++++-- ...new_functions_must_be_documented.reference | 4 -- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/Functions/makeDate.cpp b/src/Functions/makeDate.cpp index 9be5a648cfe..ef960da1409 100644 --- a/src/Functions/makeDate.cpp +++ b/src/Functions/makeDate.cpp @@ -736,10 +736,43 @@ REGISTER_FUNCTION(MakeDate) factory.registerFunction(); factory.registerFunction(); - factory.registerFunction>(); - factory.registerFunction>(); - factory.registerFunction(); - factory.registerFunction(); + factory.registerFunction>( + FunctionDocumentation{ + .description = R"( +Converts a number containing the year, month and day number to a Date. +This functions is the opposite of function `toYYYYMMDD()`. +The output is undefined if the input does not encode a valid Date value. +)", + .categories{"Dates and Times"} + } + ); + factory.registerFunction>( + FunctionDocumentation{ + .description = R"( +Like function `YYYYMMDDToDate()` but produces a Date32. +)", + .categories{"Dates and Times"} + } + ); + factory.registerFunction( + FunctionDocumentation{ + .description = R"( +Converts a number containing the year, month and day number to a DateTime. +The output is undefined if the input does not encode a valid DateTime value. +This functions is the opposite of function `toYYYYMMDD()`. +)", + .categories{"Dates and Times"} + } + ); + factory.registerFunction( + FunctionDocumentation{ + .description = R"( +Like function `YYYYMMDDhhmmssToDate()` but produces a DateTime64. +Accepts an additional, optional `precision` parameter after the `timezone` parameter. +)", + .categories{"Dates and Times"} + } + ); } } 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 7928ac23438..dd843058281 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 @@ -56,10 +56,6 @@ URLHierarchy URLPathHierarchy UUIDNumToString UUIDStringToNum -YYYYMMDDToDate -YYYYMMDDToDate32 -YYYYMMDDhhmmssToDateTime -YYYYMMDDhhmmssToDateTime64 _CAST __bitBoolMaskAnd __bitBoolMaskOr