Omega359 commented on code in PR #12908:
URL: https://github.com/apache/datafusion/pull/12908#discussion_r1798337489


##########
datafusion/functions/src/math/monotonicity.rs:
##########
@@ -218,14 +545,76 @@ pub fn sqrt_order(input: &[ExprProperties]) -> 
Result<SortProperties> {
     }
 }
 
+static DOCUMENTATION_SQRT: OnceLock<Documentation> = OnceLock::new();
+
+pub fn get_sqrt_doc() -> &'static Documentation {
+    DOCUMENTATION_SQRT.get_or_init(|| {
+        Documentation::builder()
+            .with_doc_section(DOC_SECTION_MATH)
+            .with_description(
+                "Returns the square root of a number.",
+            )
+            .with_syntax_example("sqrt(numeric_expression)")
+            .with_standard_argument("numeric_expression", "Numeric")
+            .build()
+            .unwrap()
+    })
+}
+
 /// Non-decreasing between vertical asymptotes at x = k * π ± π / 2 for any
 /// integer k.
 // TODO: Implement ordering rule of the TAN function.
 pub fn tan_order(_input: &[ExprProperties]) -> Result<SortProperties> {
     Ok(SortProperties::Unordered)
 }
 
+static DOCUMENTATION_TAN: OnceLock<Documentation> = OnceLock::new();
+
+pub fn get_tan_doc() -> &'static Documentation {
+    DOCUMENTATION_TAN.get_or_init(|| {
+        Documentation::builder()
+            .with_doc_section(DOC_SECTION_MATH)
+            .with_description(
+                "Returns the tangent of a number.",
+            )
+            .with_syntax_example("tan(numeric_expression)")
+            .with_standard_argument("numeric_expression", "Numeric")
+            .build()
+            .unwrap()
+    })
+}
+
 /// Non-decreasing for all real numbers.
 pub fn tanh_order(input: &[ExprProperties]) -> Result<SortProperties> {
     Ok(input[0].sort_properties)
 }
+
+static DOCUMENTATION_TANH: OnceLock<Documentation> = OnceLock::new();
+
+pub fn get_tanh_doc() -> &'static Documentation {
+    DOCUMENTATION_TANH.get_or_init(|| {
+        Documentation::builder()
+            .with_doc_section(DOC_SECTION_MATH)
+            .with_description(
+                "Returns the hyperbolic tangent of a number.",
+            )
+            .with_syntax_example("tanh(numeric_expression)")
+            .with_standard_argument("numeric_expression", "Numeric")
+            .build()
+            .unwrap()
+    })
+}
+
+pub fn get_pow_doc() -> &'static Documentation {
+    static DOCUMENTATION: OnceLock<Documentation> = OnceLock::new();
+

Review Comment:
   Aliases do not need documentation as the script that generates the docs will 
insert the alias link automatically



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to