Skip to content

Apache DataFusion SQL Query Engine

docs: fix signum documentation to say zero returns 0 (#24324)

anchora635b18d3bc8
diff --git a/datafusion/functions/src/math/signum.rs b/datafusion/functions/src/math/signum.rs
index 05b78fcffe..21b38988c0 100644
--- a/datafusion/functions/src/math/signum.rs
+++ b/datafusion/functions/src/math/signum.rs
@@ -34,7 +34,8 @@ use datafusion_macros::user_doc;
doc_section(label = "Math Functions"),
description = r#"Returns the sign of a number.
Negative numbers return `-1`.
-Zero and positive numbers return `1`."#,
+Zero returns `0`.
+Positive numbers return `1`."#,
syntax_example = "signum(numeric_expression)",
standard_argument(name = "numeric_expression", prefix = "Numeric"),
sql_example = r#"```sql
diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.md
index 1bfec4ce43..644d42935e 100644
--- a/docs/source/user-guide/sql/scalar_functions.md
+++ b/docs/source/user-guide/sql/scalar_functions.md
@@ -796,7 +796,8 @@ round(numeric_expression[, decimal_places])
Returns the sign of a number.
Negative numbers return `-1`.
-Zero and positive numbers return `1`.
+Zero returns `0`.
+Positive numbers return `1`.
```sql
signum(numeric_expression)