Apache DataFusion SQL Query Engine
Improve doc wording around scalar authoring (#12478)
Piotr Findeisen7f8a4c436561
diff --git a/datafusion/common/src/scalar/mod.rs b/datafusion/common/src/scalar/mod.rsindex 5cec2e56bd..3356a85fb6 100644--- a/datafusion/common/src/scalar/mod.rs+++ b/datafusion/common/src/scalar/mod.rs@@ -104,7 +104,7 @@ pub use struct_builder::ScalarStructBuilder;////// `ScalarValue` represents null values in the same way as Arrow. Nulls are/// "typed" in the sense that a null value in an [`Int32Array`] is different-/// than a null value in a [`Float64Array`], and is different than the values in+/// from a null value in a [`Float64Array`], and is different from the values in/// a [`NullArray`].////// ```diff --git a/datafusion/expr/src/udf.rs b/datafusion/expr/src/udf.rsindex be3f811dbe..23ea425915 100644--- a/datafusion/expr/src/udf.rs+++ b/datafusion/expr/src/udf.rs@@ -566,8 +566,8 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {/// documentation for more details on type coercion////// For example, if your function requires a floating point arguments, but the user calls- /// it like `my_func(1::int)` (aka with `1` as an integer), coerce_types could return `[DataType::Float64]`- /// to ensure the argument was cast to `1::double`+ /// it like `my_func(1::int)` (i.e. with `1` as an integer), coerce_types can return `[DataType::Float64]`+ /// to ensure the argument is converted to `1::double`////// # Parameters/// * `arg_types`: The argument types of the arguments this function withdiff --git a/datafusion/functions/src/macros.rs b/datafusion/functions/src/macros.rsindex 484afb57f7..e47818bc86 100644--- a/datafusion/functions/src/macros.rs+++ b/datafusion/functions/src/macros.rs@@ -66,7 +66,7 @@ macro_rules! export_functions {}/// Creates a singleton `ScalarUDF` of the `$UDF` function named `$GNAME` and a-/// function named `$NAME` which returns that function named $NAME.+/// function named `$NAME` which returns that singleton.////// This is used to ensure creating the list of `ScalarUDF` only happens once.macro_rules! make_udf_function {@@ -75,7 +75,7 @@ macro_rules! make_udf_function {static $GNAME: std::sync::OnceLock<std::sync::Arc<datafusion_expr::ScalarUDF>> =std::sync::OnceLock::new();- #[doc = "Return a [`ScalarUDF`](datafusion_expr::ScalarUDF) for "]+ #[doc = "Return a [`ScalarUDF`](datafusion_expr::ScalarUDF) implementation "]#[doc = stringify!($UDF)]pub fn $NAME() -> std::sync::Arc<datafusion_expr::ScalarUDF> {$GNAME