Apache DataFusion SQL Query Engine
Added expresion to "with_standard_argument" (#12926)
Jonathan Chene9584bc46ffc
diff --git a/datafusion/expr/src/udf_docs.rs b/datafusion/expr/src/udf_docs.rsindex 8e25556660..63d1a96434 100644--- a/datafusion/expr/src/udf_docs.rs+++ b/datafusion/expr/src/udf_docs.rs@@ -147,23 +147,29 @@ impl DocumentationBuilder {/// Add a standard "expression" argument to the documentation///- /// This is similar to [`Self::with_argument`] except that a standard- /// description is appended to the end: `"Can be a constant, column, or- /// function, and any combination of arithmetic operators."`- ///- /// The argument is rendered like+ /// The argument is rendered like below if Some() is passed through:////// ```text/// <arg_name>:/// <expression_type> expression to operate on. Can be a constant, column, or function, and any combination of operators./// ```+ ///+ /// The argument is rendered like below if None is passed through:+ ///+ /// ```text+ /// <arg_name>:+ /// The expression to operate on. Can be a constant, column, or function, and any combination of operators.+ /// ```pub fn with_standard_argument(self,arg_name: impl Into<String>,- expression_type: impl AsRef<str>,+ expression_type: Option<&str>,) -> Self {- let expression_type = expression_type.as_ref();- self.with_argument(arg_name, format!("{expression_type} expression to operate on. Can be a constant, column, or function, and any combination of operators."))+ let description = format!(+ "{} expression to operate on. Can be a constant, column, or function, and any combination of operators.",+ expression_type.unwrap_or("The")+ );+ self.with_argument(arg_name, description)}pub fn with_related_udf(mut self, related_udf: impl Into<String>) -> Self {diff --git a/datafusion/functions-aggregate/src/approx_distinct.rs b/datafusion/functions-aggregate/src/approx_distinct.rsindex d6cc711147..1df106feb4 100644--- a/datafusion/functions-aggregate/src/approx_distinct.rs+++ b/datafusion/functions-aggregate/src/approx_distinct.rs@@ -332,7 +332,7 @@ fn get_approx_distinct_doc() -> &'static Documentation {+-----------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/approx_median.rs b/datafusion/functions-aggregate/src/approx_median.rsindex 84442fa5a2..96609622a5 100644--- a/datafusion/functions-aggregate/src/approx_median.rs+++ b/datafusion/functions-aggregate/src/approx_median.rs@@ -145,7 +145,7 @@ fn get_approx_median_doc() -> &'static Documentation {+-----------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/approx_percentile_cont.rs b/datafusion/functions-aggregate/src/approx_percentile_cont.rsindex 9b8a99e977..83b9f714fa 100644--- a/datafusion/functions-aggregate/src/approx_percentile_cont.rs+++ b/datafusion/functions-aggregate/src/approx_percentile_cont.rs@@ -293,7 +293,7 @@ fn get_approx_percentile_cont_doc() -> &'static Documentation {| 65.0 |+-------------------------------------------------+```"#)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).with_argument("percentile", "Percentile to compute. Must be a float value between 0 and 1 (inclusive).").with_argument("centroids", "Number of centroids to use in the t-digest algorithm. _Default is 100_. A higher number results in more accurate approximation but requires more memory.").build()diff --git a/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs b/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rsindex a5362713a6..b86fec1e03 100644--- a/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs+++ b/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs@@ -179,7 +179,7 @@ fn get_approx_percentile_cont_with_weight_doc() -> &'static Documentation {+----------------------------------------------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).with_argument("weight", "Expression to use as weight. Can be a constant, column, or function, and any combination of arithmetic operators.").with_argument("percentile", "Percentile to compute. Must be a float value between 0 and 1 (inclusive).").build()diff --git a/datafusion/functions-aggregate/src/array_agg.rs b/datafusion/functions-aggregate/src/array_agg.rsindex 28ff6fb346..6f52375683 100644--- a/datafusion/functions-aggregate/src/array_agg.rs+++ b/datafusion/functions-aggregate/src/array_agg.rs@@ -168,7 +168,7 @@ fn get_array_agg_doc() -> &'static Documentation {+-----------------------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/average.rs b/datafusion/functions-aggregate/src/average.rsindex 8782f8cfcc..67b824c2ea 100644--- a/datafusion/functions-aggregate/src/average.rs+++ b/datafusion/functions-aggregate/src/average.rs@@ -263,7 +263,7 @@ fn get_avg_doc() -> &'static Documentation {+---------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/bit_and_or_xor.rs b/datafusion/functions-aggregate/src/bit_and_or_xor.rsindex c5382c168f..0a281ad814 100644--- a/datafusion/functions-aggregate/src/bit_and_or_xor.rs+++ b/datafusion/functions-aggregate/src/bit_and_or_xor.rs@@ -142,7 +142,7 @@ fn get_bit_and_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_GENERAL).with_description("Computes the bitwise AND of all non-null input values.").with_syntax_example("bit_and(expression)")- .with_standard_argument("expression", "Integer")+ .with_standard_argument("expression", Some("Integer")).build().unwrap()})@@ -156,7 +156,7 @@ fn get_bit_or_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_GENERAL).with_description("Computes the bitwise OR of all non-null input values.").with_syntax_example("bit_or(expression)")- .with_standard_argument("expression", "Integer")+ .with_standard_argument("expression", Some("Integer")).build().unwrap()})@@ -172,7 +172,7 @@ fn get_bit_xor_doc() -> &'static Documentation {"Computes the bitwise exclusive OR of all non-null input values.",).with_syntax_example("bit_xor(expression)")- .with_standard_argument("expression", "Integer")+ .with_standard_argument("expression", Some("Integer")).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/bool_and_or.rs b/datafusion/functions-aggregate/src/bool_and_or.rsindex 63ad1ea573..b410bfa139 100644--- a/datafusion/functions-aggregate/src/bool_and_or.rs+++ b/datafusion/functions-aggregate/src/bool_and_or.rs@@ -201,7 +201,7 @@ fn get_bool_and_doc() -> &'static Documentation {+----------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})@@ -350,7 +350,7 @@ fn get_bool_or_doc() -> &'static Documentation {+----------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/correlation.rs b/datafusion/functions-aggregate/src/correlation.rsindex d5dc482d68..40429289d7 100644--- a/datafusion/functions-aggregate/src/correlation.rs+++ b/datafusion/functions-aggregate/src/correlation.rs@@ -134,8 +134,8 @@ fn get_corr_doc() -> &'static Documentation {+--------------------------------+```"#,)- .with_standard_argument("expression1", "First")- .with_standard_argument("expression2", "Second")+ .with_standard_argument("expression1", Some("First"))+ .with_standard_argument("expression2", Some("Second")).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/count.rs b/datafusion/functions-aggregate/src/count.rsindex 2511c70c46..61dbfd6749 100644--- a/datafusion/functions-aggregate/src/count.rs+++ b/datafusion/functions-aggregate/src/count.rs@@ -357,7 +357,7 @@ fn get_count_doc() -> &'static Documentation {| 120 |+------------------+```"#)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/covariance.rs b/datafusion/functions-aggregate/src/covariance.rsindex f3b323d74d..4b2b21059d 100644--- a/datafusion/functions-aggregate/src/covariance.rs+++ b/datafusion/functions-aggregate/src/covariance.rs@@ -150,8 +150,8 @@ fn get_covar_samp_doc() -> &'static Documentation {+-----------------------------------+```"#,)- .with_standard_argument("expression1", "First")- .with_standard_argument("expression2", "Second")+ .with_standard_argument("expression1", Some("First"))+ .with_standard_argument("expression2", Some("Second")).build().unwrap()})@@ -248,8 +248,8 @@ fn get_covar_pop_doc() -> &'static Documentation {+-----------------------------------+```"#,)- .with_standard_argument("expression1", "First")- .with_standard_argument("expression2", "Second")+ .with_standard_argument("expression1", Some("First"))+ .with_standard_argument("expression2", Some("Second")).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/first_last.rs b/datafusion/functions-aggregate/src/first_last.rsindex 2a3fc62365..c708d23ae6 100644--- a/datafusion/functions-aggregate/src/first_last.rs+++ b/datafusion/functions-aggregate/src/first_last.rs@@ -191,7 +191,7 @@ fn get_first_value_doc() -> &'static Documentation {+-----------------------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})@@ -519,7 +519,7 @@ fn get_last_value_doc() -> &'static Documentation {+-----------------------------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/median.rs b/datafusion/functions-aggregate/src/median.rsindex 5a0cac2c82..e0011e2e0f 100644--- a/datafusion/functions-aggregate/src/median.rs+++ b/datafusion/functions-aggregate/src/median.rs@@ -177,7 +177,7 @@ fn get_median_doc() -> &'static Documentation {+----------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/min_max.rs b/datafusion/functions-aggregate/src/min_max.rsindex d576b1fdad..8102d0e479 100644--- a/datafusion/functions-aggregate/src/min_max.rs+++ b/datafusion/functions-aggregate/src/min_max.rs@@ -357,7 +357,7 @@ fn get_max_doc() -> &'static Documentation {+----------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})@@ -1187,7 +1187,7 @@ fn get_min_doc() -> &'static Documentation {+----------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/nth_value.rs b/datafusion/functions-aggregate/src/nth_value.rsindex 6d8cea8f05..3e7f51af52 100644--- a/datafusion/functions-aggregate/src/nth_value.rs+++ b/datafusion/functions-aggregate/src/nth_value.rs@@ -191,7 +191,7 @@ fn get_nth_value_doc() -> &'static Documentation {| 2 | 45000 | 45000 |+---------+--------+-------------------------+```"#)- .with_standard_argument("expression", "The column or expression to retrieve the nth value from.")+ .with_argument("expression", "The column or expression to retrieve the nth value from.").with_argument("n", "The position (nth) of the value to retrieve, based on the ordering.").build().unwrap()diff --git a/datafusion/functions-aggregate/src/stddev.rs b/datafusion/functions-aggregate/src/stddev.rsindex 332a8efcc0..0d18216875 100644--- a/datafusion/functions-aggregate/src/stddev.rs+++ b/datafusion/functions-aggregate/src/stddev.rs@@ -158,7 +158,7 @@ fn get_stddev_doc() -> &'static Documentation {+----------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})@@ -282,7 +282,7 @@ fn get_stddev_pop_doc() -> &'static Documentation {+--------------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/sum.rs b/datafusion/functions-aggregate/src/sum.rsindex 3b561f3028..943f66a92c 100644--- a/datafusion/functions-aggregate/src/sum.rs+++ b/datafusion/functions-aggregate/src/sum.rs@@ -260,7 +260,7 @@ fn get_sum_doc() -> &'static Documentation {+-----------------------+```"#,)- .with_standard_argument("expression", "The")+ .with_standard_argument("expression", None).build().unwrap()})diff --git a/datafusion/functions-aggregate/src/variance.rs b/datafusion/functions-aggregate/src/variance.rsindex 49a30344c2..8453c9d301 100644--- a/datafusion/functions-aggregate/src/variance.rs+++ b/datafusion/functions-aggregate/src/variance.rs@@ -153,7 +153,7 @@ fn get_variance_sample_doc() -> &'static Documentation {"Returns the statistical sample variance of a set of numbers.",).with_syntax_example("var(expression)")- .with_standard_argument("expression", "Numeric")+ .with_standard_argument("expression", Some("Numeric")).build().unwrap()})@@ -259,7 +259,7 @@ fn get_variance_population_doc() -> &'static Documentation {"Returns the statistical population variance of a set of numbers.",).with_syntax_example("var_pop(expression)")- .with_standard_argument("expression", "Numeric")+ .with_standard_argument("expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/crypto/digest.rs b/datafusion/functions/src/crypto/digest.rsindex 9ec07b1cab..0e43fb7785 100644--- a/datafusion/functions/src/crypto/digest.rs+++ b/datafusion/functions/src/crypto/digest.rs@@ -98,7 +98,7 @@ fn get_digest_doc() -> &'static Documentation {```"#,).with_standard_argument(- "expression", "String")+ "expression", Some("String")).with_argument("algorithm","String expression specifying algorithm to use. Must be one of:diff --git a/datafusion/functions/src/crypto/md5.rs b/datafusion/functions/src/crypto/md5.rsindex f273c9d28c..062d63bcc0 100644--- a/datafusion/functions/src/crypto/md5.rs+++ b/datafusion/functions/src/crypto/md5.rs@@ -112,7 +112,7 @@ fn get_md5_doc() -> &'static Documentation {+-------------------------------------+```"#,)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).build().unwrap()})diff --git a/datafusion/functions/src/crypto/sha224.rs b/datafusion/functions/src/crypto/sha224.rsindex 868c8cdc35..39202d5bf6 100644--- a/datafusion/functions/src/crypto/sha224.rs+++ b/datafusion/functions/src/crypto/sha224.rs@@ -68,7 +68,7 @@ fn get_sha224_doc() -> &'static Documentation {+------------------------------------------+```"#,)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).build().unwrap()})diff --git a/datafusion/functions/src/crypto/sha256.rs b/datafusion/functions/src/crypto/sha256.rsindex 99a470efbc..74deb3fc6c 100644--- a/datafusion/functions/src/crypto/sha256.rs+++ b/datafusion/functions/src/crypto/sha256.rs@@ -92,7 +92,7 @@ fn get_sha256_doc() -> &'static Documentation {+--------------------------------------+```"#,)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).build().unwrap()})diff --git a/datafusion/functions/src/crypto/sha384.rs b/datafusion/functions/src/crypto/sha384.rsindex afe2db7478..9b1e1ba9ec 100644--- a/datafusion/functions/src/crypto/sha384.rs+++ b/datafusion/functions/src/crypto/sha384.rs@@ -92,7 +92,7 @@ fn get_sha384_doc() -> &'static Documentation {+-----------------------------------------+```"#,)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).build().unwrap()})diff --git a/datafusion/functions/src/datetime/to_date.rs b/datafusion/functions/src/datetime/to_date.rsindex b21fe995ce..82e189698c 100644--- a/datafusion/functions/src/datetime/to_date.rs+++ b/datafusion/functions/src/datetime/to_date.rs@@ -111,7 +111,7 @@ Note: `to_date` returns Date32, which represents its values as the number of dayAdditional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/to_date.rs)"#)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).with_argument("format_n","Optional [Chrono format](https://docs.rs/chrono/latest/chrono/format/strftime/index.html) strings to use to parse the expression. Formats will be tried in the orderdiff --git a/datafusion/functions/src/math/abs.rs b/datafusion/functions/src/math/abs.rsindex 5dcbb99eae..5511a57d85 100644--- a/datafusion/functions/src/math/abs.rs+++ b/datafusion/functions/src/math/abs.rs@@ -201,7 +201,7 @@ fn get_abs_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the absolute value of a number.").with_syntax_example("abs(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/factorial.rs b/datafusion/functions/src/math/factorial.rsindex ac04c03190..4b87284744 100644--- a/datafusion/functions/src/math/factorial.rs+++ b/datafusion/functions/src/math/factorial.rs@@ -85,7 +85,7 @@ fn get_factorial_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Factorial. Returns 1 if value is less than 2.").with_syntax_example("factorial(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/gcd.rs b/datafusion/functions/src/math/gcd.rsindex 5e56dacb93..f4edef3acc 100644--- a/datafusion/functions/src/math/gcd.rs+++ b/datafusion/functions/src/math/gcd.rs@@ -87,8 +87,8 @@ fn get_gcd_doc() -> &'static Documentation {"Returns the greatest common divisor of `expression_x` and `expression_y`. Returns 0 if both inputs are zero.",).with_syntax_example("gcd(expression_x, expression_y)")- .with_standard_argument("expression_x", "First numeric")- .with_standard_argument("expression_y", "Second numeric")+ .with_standard_argument("expression_x", Some("First numeric"))+ .with_standard_argument("expression_y", Some("Second numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/iszero.rs b/datafusion/functions/src/math/iszero.rsindex b8deee2c61..7e5d4fe77f 100644--- a/datafusion/functions/src/math/iszero.rs+++ b/datafusion/functions/src/math/iszero.rs@@ -90,7 +90,7 @@ fn get_iszero_doc() -> &'static Documentation {"Returns true if a given number is +0.0 or -0.0 otherwise returns false.",).with_syntax_example("iszero(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/lcm.rs b/datafusion/functions/src/math/lcm.rsindex 844dbfd39d..64b07ce606 100644--- a/datafusion/functions/src/math/lcm.rs+++ b/datafusion/functions/src/math/lcm.rs@@ -88,8 +88,8 @@ fn get_lcm_doc() -> &'static Documentation {"Returns the least common multiple of `expression_x` and `expression_y`. Returns 0 if either input is zero.",).with_syntax_example("lcm(expression_x, expression_y)")- .with_standard_argument("expression_x", "First numeric")- .with_standard_argument("expression_y", "Second numeric")+ .with_standard_argument("expression_x", Some("First numeric"))+ .with_standard_argument("expression_y", Some("Second numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/log.rs b/datafusion/functions/src/math/log.rsindex 07ff8e2166..89ba14e32b 100644--- a/datafusion/functions/src/math/log.rs+++ b/datafusion/functions/src/math/log.rs@@ -57,8 +57,8 @@ fn get_log_doc() -> &'static Documentation {.with_description("Returns the base-x logarithm of a number. Can either provide a specified base, or if omitted then takes the base-10 of a number.").with_syntax_example(r#"log(base, numeric_expression)log(numeric_expression)"#)- .with_standard_argument("base", "Base numeric")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("base", Some("Base numeric"))+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/monotonicity.rs b/datafusion/functions/src/math/monotonicity.rsindex 959434d74f..19c85f4b6e 100644--- a/datafusion/functions/src/math/monotonicity.rs+++ b/datafusion/functions/src/math/monotonicity.rs@@ -46,7 +46,7 @@ pub fn get_acos_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the arc cosine or inverse cosine of a number.").with_syntax_example("acos(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -79,7 +79,7 @@ pub fn get_acosh_doc() -> &'static Documentation {"Returns the area hyperbolic cosine or inverse hyperbolic cosine of a number.",).with_syntax_example("acosh(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -108,7 +108,7 @@ pub fn get_asin_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the arc sine or inverse sine of a number.").with_syntax_example("asin(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -129,7 +129,7 @@ pub fn get_asinh_doc() -> &'static Documentation {"Returns the area hyperbolic sine or inverse hyperbolic sine of a number.",).with_syntax_example("asinh(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -148,7 +148,7 @@ pub fn get_atan_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the arc tangent or inverse tangent of a number.").with_syntax_example("atan(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -179,7 +179,7 @@ pub fn get_atanh_doc() -> &'static Documentation {"Returns the area hyperbolic tangent or inverse hyperbolic tangent of a number.",).with_syntax_example("atanh(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -223,7 +223,7 @@ pub fn get_cbrt_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the cube root of a number.").with_syntax_example("cbrt(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -244,7 +244,7 @@ pub fn get_ceil_doc() -> &'static Documentation {"Returns the nearest integer greater than or equal to a number.",).with_syntax_example("ceil(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -265,7 +265,7 @@ pub fn get_cos_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the cosine of a number.").with_syntax_example("cos(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -295,7 +295,7 @@ pub fn get_cosh_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the hyperbolic cosine of a number.").with_syntax_example("cosh(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -314,7 +314,7 @@ pub fn get_degrees_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Converts radians to degrees.").with_syntax_example("degrees(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -333,7 +333,7 @@ pub fn get_exp_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the base-e exponential of a number.").with_syntax_example("exp(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -354,7 +354,7 @@ pub fn get_floor_doc() -> &'static Documentation {"Returns the nearest integer less than or equal to a number.",).with_syntax_example("floor(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -382,7 +382,7 @@ pub fn get_ln_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the natural logarithm of a number.").with_syntax_example("ln(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -410,7 +410,7 @@ pub fn get_log2_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the base-2 logarithm of a number.").with_syntax_example("log2(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -438,7 +438,7 @@ pub fn get_log10_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the base-10 logarithm of a number.").with_syntax_example("log10(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -457,7 +457,7 @@ pub fn get_radians_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Converts degrees to radians.").with_syntax_example("radians(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -478,7 +478,7 @@ pub fn get_sin_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the sine of a number.").with_syntax_example("sin(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -497,7 +497,7 @@ pub fn get_sinh_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Returns the hyperbolic sine of a number.").with_syntax_example("sinh(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -525,7 +525,7 @@ pub fn get_sqrt_doc() -> &'static Documentation {.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")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -546,7 +546,7 @@ pub fn get_tan_doc() -> &'static Documentation {.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")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})@@ -565,7 +565,7 @@ pub fn get_tanh_doc() -> &'static Documentation {.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")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/nans.rs b/datafusion/functions/src/math/nans.rsindex 79e4587958..c1dd1aacc3 100644--- a/datafusion/functions/src/math/nans.rs+++ b/datafusion/functions/src/math/nans.rs@@ -107,7 +107,7 @@ fn get_isnan_doc() -> &'static Documentation {"Returns true if a given number is +NaN or -NaN otherwise returns false.",).with_syntax_example("isnan(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/power.rs b/datafusion/functions/src/math/power.rsindex a99afaec97..9125f9b0fe 100644--- a/datafusion/functions/src/math/power.rs+++ b/datafusion/functions/src/math/power.rs@@ -181,8 +181,8 @@ fn get_power_doc() -> &'static Documentation {"Returns a base expression raised to the power of an exponent.",).with_syntax_example("power(base, exponent)")- .with_standard_argument("base", "Numeric")- .with_standard_argument("exponent", "Exponent numeric")+ .with_standard_argument("base", Some("Numeric"))+ .with_standard_argument("exponent", Some("Exponent numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/round.rs b/datafusion/functions/src/math/round.rsindex ae8eee0dbb..fec1f1ce1a 100644--- a/datafusion/functions/src/math/round.rs+++ b/datafusion/functions/src/math/round.rs@@ -114,7 +114,7 @@ fn get_round_doc() -> &'static Documentation {.with_doc_section(DOC_SECTION_MATH).with_description("Rounds a number to the nearest integer.").with_syntax_example("round(numeric_expression[, decimal_places])")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).with_argument("decimal_places","Optional. The number of decimal places to round to. Defaults to 0.",diff --git a/datafusion/functions/src/math/signum.rs b/datafusion/functions/src/math/signum.rsindex 6c020b0ce5..ac881eb42f 100644--- a/datafusion/functions/src/math/signum.rs+++ b/datafusion/functions/src/math/signum.rs@@ -101,7 +101,7 @@ Negative numbers return `-1`.Zero and positive numbers return `1`."#,).with_syntax_example("signum(numeric_expression)")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).build().unwrap()})diff --git a/datafusion/functions/src/math/trunc.rs b/datafusion/functions/src/math/trunc.rsindex 17a8442031..9a05684d23 100644--- a/datafusion/functions/src/math/trunc.rs+++ b/datafusion/functions/src/math/trunc.rs@@ -119,7 +119,7 @@ fn get_trunc_doc() -> &'static Documentation {"Truncates a number to a whole number or truncated to the specified decimal places.",).with_syntax_example("trunc(numeric_expression[, decimal_places])")- .with_standard_argument("numeric_expression", "Numeric")+ .with_standard_argument("numeric_expression", Some("Numeric")).with_argument("decimal_places", r#"Optional. The number of decimal places totruncate to. Defaults to 0 (truncate to a whole number). If`decimal_places` is a positive integer, truncates digits to thediff --git a/datafusion/functions/src/regex/regexpcount.rs b/datafusion/functions/src/regex/regexpcount.rsindex 880c910945..7f7896ecd9 100644--- a/datafusion/functions/src/regex/regexpcount.rs+++ b/datafusion/functions/src/regex/regexpcount.rs@@ -127,8 +127,8 @@ fn get_regexp_count_doc() -> &'static Documentation {| 1 |+---------------------------------------------------------------+```"#)- .with_standard_argument("str", "String")- .with_standard_argument("regexp","Regular")+ .with_standard_argument("str", Some("String"))+ .with_standard_argument("regexp",Some("Regular")).with_argument("start", "- **start**: Optional start position (the first position is 1) to search for the regular expression. Can be a constant, column, or function.").with_argument("flags",r#"Optional regular expression flags that control the behavior of the regular expression. The following flags are supported:diff --git a/datafusion/functions/src/regex/regexplike.rs b/datafusion/functions/src/regex/regexplike.rsindex aad67e4eca..13de7888aa 100644--- a/datafusion/functions/src/regex/regexplike.rs+++ b/datafusion/functions/src/regex/regexplike.rs@@ -67,8 +67,8 @@ SELECT regexp_like('aBc', '(b|d)', 'i');```Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/regexp.rs)"#)- .with_standard_argument("str", "String")- .with_standard_argument("regexp","Regular")+ .with_standard_argument("str", Some("String"))+ .with_standard_argument("regexp", Some("Regular")).with_argument("flags",r#"Optional regular expression flags that control the behavior of the regular expression. The following flags are supported:- **i**: case-insensitive: letters match both upper and lower casediff --git a/datafusion/functions/src/regex/regexpmatch.rs b/datafusion/functions/src/regex/regexpmatch.rsindex a458b205f4..019666bd7b 100644--- a/datafusion/functions/src/regex/regexpmatch.rs+++ b/datafusion/functions/src/regex/regexpmatch.rs@@ -137,7 +137,7 @@ fn get_regexp_match_doc() -> &'static Documentation {```Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/regexp.rs)"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("regexp","Regular expression to match against.Can be a constant, column, or function.").with_argument("flags",diff --git a/datafusion/functions/src/regex/regexpreplace.rs b/datafusion/functions/src/regex/regexpreplace.rsindex 279e5c6ba9..4d8e5e5fe3 100644--- a/datafusion/functions/src/regex/regexpreplace.rs+++ b/datafusion/functions/src/regex/regexpreplace.rs@@ -154,10 +154,10 @@ SELECT regexp_replace('aBc', '(b|d)', 'Ab\\1a', 'i');```Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/regexp.rs)"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("regexp","Regular expression to match against.Can be a constant, column, or function.")- .with_standard_argument("replacement", "Replacement string")+ .with_standard_argument("replacement", Some("Replacement string")).with_argument("flags",r#"Optional regular expression flags that control the behavior of the regular expression. The following flags are supported:- **g**: (global) Search globally and don't return after the first matchdiff --git a/datafusion/functions/src/string/ascii.rs b/datafusion/functions/src/string/ascii.rsindex 8d61661f97..b76d70d7e9 100644--- a/datafusion/functions/src/string/ascii.rs+++ b/datafusion/functions/src/string/ascii.rs@@ -99,7 +99,7 @@ fn get_ascii_doc() -> &'static Documentation {+-------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("chr").build().unwrap()diff --git a/datafusion/functions/src/string/bit_length.rs b/datafusion/functions/src/string/bit_length.rsindex 7d162e7d41..25b56341fc 100644--- a/datafusion/functions/src/string/bit_length.rs+++ b/datafusion/functions/src/string/bit_length.rs@@ -107,7 +107,7 @@ fn get_bit_length_doc() -> &'static Documentation {+--------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("length").with_related_udf("octet_length").build()diff --git a/datafusion/functions/src/string/btrim.rs b/datafusion/functions/src/string/btrim.rsindex 82b7599f07..f689f27d9d 100644--- a/datafusion/functions/src/string/btrim.rs+++ b/datafusion/functions/src/string/btrim.rs@@ -122,7 +122,7 @@ fn get_btrim_doc() -> &'static Documentation {| datafusion |+-------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("trim_str", "String expression to operate on. Can be a constant, column, or function, and any combination of operators. _Default is whitespace characters._").with_related_udf("ltrim").with_related_udf("rtrim")diff --git a/datafusion/functions/src/string/chr.rs b/datafusion/functions/src/string/chr.rsindex ae0900af37..0d94cab08d 100644--- a/datafusion/functions/src/string/chr.rs+++ b/datafusion/functions/src/string/chr.rs@@ -125,7 +125,7 @@ fn get_chr_doc() -> &'static Documentation {+--------------------+```"#,)- .with_standard_argument("expression", "String")+ .with_standard_argument("expression", Some("String")).with_related_udf("ascii").build().unwrap()diff --git a/datafusion/functions/src/string/concat.rs b/datafusion/functions/src/string/concat.rsindex 33a926863a..a4218c39e7 100644--- a/datafusion/functions/src/string/concat.rs+++ b/datafusion/functions/src/string/concat.rs@@ -270,7 +270,7 @@ fn get_concat_doc() -> &'static Documentation {+-------------------------------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("str_n", "Subsequent string expressions to concatenate.").with_related_udf("concat_ws").build()diff --git a/datafusion/functions/src/string/concat_ws.rs b/datafusion/functions/src/string/concat_ws.rsindex 17361b0733..8d966f4956 100644--- a/datafusion/functions/src/string/concat_ws.rs+++ b/datafusion/functions/src/string/concat_ws.rs@@ -295,11 +295,8 @@ fn get_concat_ws_doc() -> &'static Documentation {"separator","Separator to insert between concatenated strings.",)- .with_standard_argument("str", "String")- .with_standard_argument(- "str_n",- "Subsequent string expressions to concatenate.",- )+ .with_standard_argument("str", Some("String"))+ .with_argument("str_n", "Subsequent string expressions to concatenate.").with_related_udf("concat").build().unwrap()diff --git a/datafusion/functions/src/string/contains.rs b/datafusion/functions/src/string/contains.rsindex 86f1eda033..d0e63bb0f3 100644--- a/datafusion/functions/src/string/contains.rs+++ b/datafusion/functions/src/string/contains.rs@@ -95,7 +95,7 @@ fn get_contains_doc() -> &'static Documentation {+---------------------------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("search_str", "The string to search for in str.").build().unwrap()diff --git a/datafusion/functions/src/string/ends_with.rs b/datafusion/functions/src/string/ends_with.rsindex 8c90cbc3b1..88978a35c0 100644--- a/datafusion/functions/src/string/ends_with.rs+++ b/datafusion/functions/src/string/ends_with.rs@@ -103,7 +103,7 @@ fn get_ends_with_doc() -> &'static Documentation {+--------------------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("substr", "Substring to test for.").build().unwrap()diff --git a/datafusion/functions/src/string/initcap.rs b/datafusion/functions/src/string/initcap.rsindex 78c95b9a5e..5fd1e79298 100644--- a/datafusion/functions/src/string/initcap.rs+++ b/datafusion/functions/src/string/initcap.rs@@ -96,7 +96,7 @@ fn get_initcap_doc() -> &'static Documentation {| Apache Datafusion |+------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("lower").with_related_udf("upper").build()diff --git a/datafusion/functions/src/string/lower.rs b/datafusion/functions/src/string/lower.rsindex f82b11ca90..b07189a832 100644--- a/datafusion/functions/src/string/lower.rs+++ b/datafusion/functions/src/string/lower.rs@@ -89,7 +89,7 @@ fn get_lower_doc() -> &'static Documentation {+-------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("initcap").with_related_udf("upper").build()diff --git a/datafusion/functions/src/string/ltrim.rs b/datafusion/functions/src/string/ltrim.rsindex b64dcda721..91809d6916 100644--- a/datafusion/functions/src/string/ltrim.rs+++ b/datafusion/functions/src/string/ltrim.rs@@ -122,7 +122,7 @@ fn get_ltrim_doc() -> &'static Documentation {| datafusion___ |+-------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("trim_str", "String expression to trim from the beginning of the input string. Can be a constant, column, or function, and any combination of arithmetic operators. _Default is whitespace characters._").with_related_udf("btrim").with_related_udf("rtrim")diff --git a/datafusion/functions/src/string/octet_length.rs b/datafusion/functions/src/string/octet_length.rsindex 04094396fa..2ac2bf70da 100644--- a/datafusion/functions/src/string/octet_length.rs+++ b/datafusion/functions/src/string/octet_length.rs@@ -110,7 +110,7 @@ fn get_octet_length_doc() -> &'static Documentation {+--------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("bit_length").with_related_udf("length").build()diff --git a/datafusion/functions/src/string/overlay.rs b/datafusion/functions/src/string/overlay.rsindex 3b31bc3608..796776304f 100644--- a/datafusion/functions/src/string/overlay.rs+++ b/datafusion/functions/src/string/overlay.rs@@ -108,7 +108,7 @@ fn get_overlay_doc() -> &'static Documentation {| Thomas |+--------------------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("substr", "Substring to replace in str.").with_argument("pos", "The start position to start the replace in str.").with_argument("count", "The count of characters to be replaced from start position of str. If not specified, will use substr length instead.")diff --git a/datafusion/functions/src/string/repeat.rs b/datafusion/functions/src/string/repeat.rsindex 7364c7d36f..aa69f9c660 100644--- a/datafusion/functions/src/string/repeat.rs+++ b/datafusion/functions/src/string/repeat.rs@@ -107,7 +107,7 @@ fn get_repeat_doc() -> &'static Documentation {+-------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("n", "Number of times to repeat the input string.").build().unwrap()diff --git a/datafusion/functions/src/string/replace.rs b/datafusion/functions/src/string/replace.rsindex 612cd7276b..91abc39da0 100644--- a/datafusion/functions/src/string/replace.rs+++ b/datafusion/functions/src/string/replace.rs@@ -96,9 +96,9 @@ fn get_replace_doc() -> &'static Documentation {| ABcdbaBA |+-------------------------------------------------+```"#)- .with_standard_argument("str", "String")- .with_standard_argument("substr", "Substring expression to replace in the input string. Substring expression")- .with_standard_argument("replacement", "Replacement substring")+ .with_standard_argument("str", Some("String"))+ .with_standard_argument("substr", Some("Substring expression to replace in the input string. Substring"))+ .with_standard_argument("replacement", Some("Replacement substring")).build().unwrap()})diff --git a/datafusion/functions/src/string/rtrim.rs b/datafusion/functions/src/string/rtrim.rsindex 1a27502a20..06c8a85c38 100644--- a/datafusion/functions/src/string/rtrim.rs+++ b/datafusion/functions/src/string/rtrim.rs@@ -122,7 +122,7 @@ fn get_rtrim_doc() -> &'static Documentation {| ___datafusion |+-------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("trim_str", "String expression to trim from the end of the input string. Can be a constant, column, or function, and any combination of arithmetic operators. _Default is whitespace characters._").with_related_udf("btrim").with_related_udf("ltrim")diff --git a/datafusion/functions/src/string/split_part.rs b/datafusion/functions/src/string/split_part.rsindex cea3b0890f..ea01cb1f56 100644--- a/datafusion/functions/src/string/split_part.rs+++ b/datafusion/functions/src/string/split_part.rs@@ -198,7 +198,7 @@ fn get_split_part_doc() -> &'static Documentation {| 3 |+--------------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("delimiter", "String or character to split on.").with_argument("pos", "Position of the part to return.").build()diff --git a/datafusion/functions/src/string/starts_with.rs b/datafusion/functions/src/string/starts_with.rsindex 713b642d5e..dce161a2e1 100644--- a/datafusion/functions/src/string/starts_with.rs+++ b/datafusion/functions/src/string/starts_with.rs@@ -102,7 +102,7 @@ fn get_starts_with_doc() -> &'static Documentation {+----------------------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("substr", "Substring to test for.").build().unwrap()diff --git a/datafusion/functions/src/string/to_hex.rs b/datafusion/functions/src/string/to_hex.rsindex 72cd4fbffa..e0033d2d1c 100644--- a/datafusion/functions/src/string/to_hex.rs+++ b/datafusion/functions/src/string/to_hex.rs@@ -134,7 +134,7 @@ fn get_to_hex_doc() -> &'static Documentation {+-------------------------+```"#,)- .with_standard_argument("int", "Integer")+ .with_standard_argument("int", Some("Integer")).build().unwrap()})diff --git a/datafusion/functions/src/string/upper.rs b/datafusion/functions/src/string/upper.rsindex bfcb2a8699..042c26b2e3 100644--- a/datafusion/functions/src/string/upper.rs+++ b/datafusion/functions/src/string/upper.rs@@ -88,7 +88,7 @@ fn get_upper_doc() -> &'static Documentation {+---------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("initcap").with_related_udf("lower").build()diff --git a/datafusion/functions/src/unicode/character_length.rs b/datafusion/functions/src/unicode/character_length.rsindex 6e74135b60..7858a59664 100644--- a/datafusion/functions/src/unicode/character_length.rs+++ b/datafusion/functions/src/unicode/character_length.rs@@ -103,7 +103,7 @@ fn get_character_length_doc() -> &'static Documentation {+------------------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_related_udf("bit_length").with_related_udf("octet_length").build()diff --git a/datafusion/functions/src/unicode/left.rs b/datafusion/functions/src/unicode/left.rsindex 6610cfb25e..a6c2b9768f 100644--- a/datafusion/functions/src/unicode/left.rs+++ b/datafusion/functions/src/unicode/left.rs@@ -115,7 +115,7 @@ fn get_left_doc() -> &'static Documentation {| data |+-----------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("n", "Number of characters to return.").with_related_udf("right").build()diff --git a/datafusion/functions/src/unicode/lpad.rs b/datafusion/functions/src/unicode/lpad.rsindex 948afd050c..767eda203c 100644--- a/datafusion/functions/src/unicode/lpad.rs+++ b/datafusion/functions/src/unicode/lpad.rs@@ -119,7 +119,7 @@ fn get_lpad_doc() -> &'static Documentation {| helloDolly |+---------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("n", "String length to pad to.").with_argument("padding_str", "Optional string expression to pad with. Can be a constant, column, or function, and any combination of string operators. _Default is a space._").with_related_udf("rpad")diff --git a/datafusion/functions/src/unicode/reverse.rs b/datafusion/functions/src/unicode/reverse.rsindex 32872c28a6..baf3b56636 100644--- a/datafusion/functions/src/unicode/reverse.rs+++ b/datafusion/functions/src/unicode/reverse.rs@@ -105,7 +105,7 @@ fn get_reverse_doc() -> &'static Documentation {+-----------------------------+```"#,)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).build().unwrap()})diff --git a/datafusion/functions/src/unicode/right.rs b/datafusion/functions/src/unicode/right.rsindex 585611fe60..ab3b7ba1a2 100644--- a/datafusion/functions/src/unicode/right.rs+++ b/datafusion/functions/src/unicode/right.rs@@ -115,7 +115,7 @@ fn get_right_doc() -> &'static Documentation {| fusion |+------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("n", "Number of characters to return").with_related_udf("left").build()diff --git a/datafusion/functions/src/unicode/rpad.rs b/datafusion/functions/src/unicode/rpad.rsindex fd4c1ee6fe..bd9d625105 100644--- a/datafusion/functions/src/unicode/rpad.rs+++ b/datafusion/functions/src/unicode/rpad.rs@@ -140,7 +140,7 @@ fn get_rpad_doc() -> &'static Documentation {```"#).with_standard_argument("str",- "String",+ Some("String"),).with_argument("n", "String length to pad to.").with_argument("padding_str",diff --git a/datafusion/functions/src/unicode/strpos.rs b/datafusion/functions/src/unicode/strpos.rsindex e4696e4e5c..152623b0e5 100644--- a/datafusion/functions/src/unicode/strpos.rs+++ b/datafusion/functions/src/unicode/strpos.rs@@ -95,7 +95,7 @@ fn get_strpos_doc() -> &'static Documentation {| 5 |+----------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("substr", "Substring expression to search for.").build().unwrap()diff --git a/datafusion/functions/src/unicode/substr.rs b/datafusion/functions/src/unicode/substr.rsindex 4e0c293577..5a8c250090 100644--- a/datafusion/functions/src/unicode/substr.rs+++ b/datafusion/functions/src/unicode/substr.rs@@ -170,7 +170,7 @@ fn get_substr_doc() -> &'static Documentation {| fus |+----------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("start_pos", "Character position to start the substring at. The first character in the string has a position of 1.").with_argument("length", "Number of characters to extract. If not specified, returns the rest of the string after the start position.").build()diff --git a/datafusion/functions/src/unicode/substrindex.rs b/datafusion/functions/src/unicode/substrindex.rsindex 436d554a49..c04839783f 100644--- a/datafusion/functions/src/unicode/substrindex.rs+++ b/datafusion/functions/src/unicode/substrindex.rs@@ -115,7 +115,7 @@ If count is negative, everything to the right of the final delimiter (counting f| org |+----------------------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("delim", "The string to find in str to split str.").with_argument("count", "The number of times to search for the delimiter. Can be either a positive or negative number.").build()diff --git a/datafusion/functions/src/unicode/translate.rs b/datafusion/functions/src/unicode/translate.rsindex cbee9a6fe1..fa626b396b 100644--- a/datafusion/functions/src/unicode/translate.rs+++ b/datafusion/functions/src/unicode/translate.rs@@ -101,7 +101,7 @@ fn get_translate_doc() -> &'static Documentation {| there |+--------------------------------------------------+```"#)- .with_standard_argument("str", "String")+ .with_standard_argument("str", Some("String")).with_argument("chars", "Characters to translate.").with_argument("translation", "Translation characters. Translation characters replace only characters at the same position in the **chars** string.").build()diff --git a/docs/source/user-guide/sql/aggregate_functions_new.md b/docs/source/user-guide/sql/aggregate_functions_new.mdindex 6c9d9b043f..24ef313f3d 100644--- a/docs/source/user-guide/sql/aggregate_functions_new.md+++ b/docs/source/user-guide/sql/aggregate_functions_new.md@@ -562,7 +562,7 @@ nth_value(expression, n ORDER BY expression)#### Arguments-- **expression**: The column or expression to retrieve the nth value from. expression to operate on. Can be a constant, column, or function, and any combination of operators.+- **expression**: The column or expression to retrieve the nth value from.- **n**: The position (nth) of the value to retrieve, based on the ordering.#### Examplediff --git a/docs/source/user-guide/sql/scalar_functions_new.md b/docs/source/user-guide/sql/scalar_functions_new.mdindex ac6e56a44c..1f4ec1c278 100644--- a/docs/source/user-guide/sql/scalar_functions_new.md+++ b/docs/source/user-guide/sql/scalar_functions_new.md@@ -908,7 +908,7 @@ concat_ws(separator, str[, ..., str_n])- **separator**: Separator to insert between concatenated strings.- **str**: String expression to operate on. Can be a constant, column, or function, and any combination of operators.-- **str_n**: Subsequent string expressions to concatenate. expression to operate on. Can be a constant, column, or function, and any combination of operators.+- **str_n**: Subsequent string expressions to concatenate.#### Example@@ -1250,7 +1250,7 @@ replace(str, substr, replacement)#### Arguments- **str**: String expression to operate on. Can be a constant, column, or function, and any combination of operators.-- **substr**: Substring expression to replace in the input string. Substring expression expression to operate on. Can be a constant, column, or function, and any combination of operators.+- **substr**: Substring expression to replace in the input string. Substring expression to operate on. Can be a constant, column, or function, and any combination of operators.- **replacement**: Replacement substring expression to operate on. Can be a constant, column, or function, and any combination of operators.#### Example