Skip to content

Commit

Permalink
doc-gen: fix typo and update function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng-Yuan-Lai committed Dec 28, 2024
1 parent 7e5c6c1 commit 6d84829
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions datafusion/functions/src/crypto/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ use std::any::Any;
argument(
name = "algorithm",
description = "String expression specifying algorithm to use. Must be one of:
- md5
- sha224
- sha256
- sha384
- sha512
- blake2s
- blake2b
- blake3"
- md5
- sha224
- sha256
- sha384
- sha512
- blake2s
- blake2b
- blake3"
)
)]
#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/crypto/md5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::any::Any;

#[user_doc(
doc_section(label = "Hashing Functions"),
description = "Computes an MD5 128-bit checksum for a string expression",
description = "Computes an MD5 128-bit checksum for a string expression.",
syntax_example = "md5(expression)",
sql_example = r#"```sql
> select md5('foo');
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/crypto/sha224.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use std::any::Any;
#[user_doc(
doc_section(label = "Hashing Functions"),
description = "Computes the SHA-224 hash of a binary string.",
syntax_example = "sha224(expression",
syntax_example = "sha224(expression)",
sql_example = r#"```sql
> select sha224('foo');
+------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/crypto/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use std::any::Any;
#[user_doc(
doc_section(label = "Hashing Functions"),
description = "Computes the SHA-256 hash of a binary string.",
syntax_example = "sha256(expression",
syntax_example = "sha256(expression)",
sql_example = r#"```sql
> select sha256('foo');
+--------------------------------------+
Expand Down
12 changes: 6 additions & 6 deletions datafusion/functions/src/crypto/sha384.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ use std::any::Any;
#[user_doc(
doc_section(label = "Hashing Functions"),
description = "Computes the SHA-384 hash of a binary string.",
syntax_example = "sha384(expression",
syntax_example = "sha384(expression)",
sql_example = r#"```sql
> select sha384('foo');
+--------------------------------------+
| sha384(Utf8("foo")) |
+--------------------------------------+
| <sha384_hash_result> |
+--------------------------------------+
+-----------------------------------------+
| sha384(Utf8("foo")) |
+-----------------------------------------+
| <sha384_hash_result> |
+-----------------------------------------+
```"#,
standard_argument(name = "expression", prefix = "String")
)]
Expand Down
12 changes: 6 additions & 6 deletions datafusion/functions/src/crypto/sha512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ use std::any::Any;
#[user_doc(
doc_section(label = "Hashing Functions"),
description = "Computes the SHA-512 hash of a binary string.",
syntax_example = "sha512(expression",
syntax_example = "sha512(expression)",
sql_example = r#"```sql
> select sha512('foo');
+--------------------------------------+
| sha512(Utf8("foo")) |
+--------------------------------------+
| <sha512_hash_result> |
+--------------------------------------+
+-------------------------------------------+
| sha512(Utf8("foo")) |
+-------------------------------------------+
| <sha512_hash_result> |
+-------------------------------------------+
```"#,
standard_argument(name = "expression", prefix = "String")
)]
Expand Down
18 changes: 9 additions & 9 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4195,14 +4195,14 @@ digest(expression, algorithm)

- **expression**: String expression to operate on. Can be a constant, column, or function, and any combination of operators.
- **algorithm**: String expression specifying algorithm to use. Must be one of:
- md5
- sha224
- sha256
- sha384
- sha512
- blake2s
- blake2b
- blake3
- md5
- sha224
- sha256
- sha384
- sha512
- blake2s
- blake2b
- blake3

#### Example

Expand Down Expand Up @@ -4317,7 +4317,7 @@ sha512(expression)

#### Arguments

- **expression**: String
- **expression**: String expression to operate on. Can be a constant, column, or function, and any combination of operators.

#### Example

Expand Down

0 comments on commit 6d84829

Please sign in to comment.