Skip to content

Commit

Permalink
Merge pull request #10058 from johnhaxx7/jhe-function-doc2
Browse files Browse the repository at this point in the history
docs(functions): Re-organize hash function doc
  • Loading branch information
BohuTANG authored Feb 15, 2023
2 parents 7329f4b + 9b2cfff commit aa88e26
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 327 deletions.
6 changes: 1 addition & 5 deletions docs/doc/15-sql-functions/70-hash-functions/_category_.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"label": "Hash Functions",
"link": {
"type": "generated-index",
"slug": "/reference/functions/hash-functions"
}
"label": "Hash Functions"
}
33 changes: 0 additions & 33 deletions docs/doc/15-sql-functions/70-hash-functions/blake3hash.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/doc/15-sql-functions/70-hash-functions/city64withseed.md

This file was deleted.

16 changes: 16 additions & 0 deletions docs/doc/15-sql-functions/70-hash-functions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Hash Functions
---

| Function | Description | Example | Result |
|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|------------------------------------------------------------------|
| **BLAKE3(expr)** | Calculates an BLAKE3 256-bit checksum for the string. The value is returned as a string of 64 hexadecimal digits or NULL if the argument was NULL. | **BLAKE3('1234567890')** | d12e417e04494572b561ba2c12c3d7f9e5107c4747e27b9a8a54f8480c63e841 |
| **CITY64WITHSEED(expr1, expr2)** | Calculates a City64WithSeed 64-bit hash for the string. | **CITY64WITHSEED('1234567890', 12)** | 10660895976650300430 |
| **MD5(expr)** | Calculates an MD5 128-bit checksum for the string. The value is returned as a string of 32 hexadecimal digits or NULL if the argument was NULL. | **MD5('1234567890')** | e807f1fcf82d132f9bb018ca6738a19f |
| **SHA(expr)** | Calculates an SHA-1 160-bit checksum for the string, as described in RFC 3174 (Secure Hash Algorithm). The value is returned as a string of 40 hexadecimal digits or NULL if the argument was NULL. | **SHA('1234567890')** | 01b307acba4f54f55aafc33bb06bbbf6ca803e9a |
| **SHA1(expr)** | Alias for SHA. Calculates an SHA-1 160-bit checksum for the string, as described in RFC 3174 (Secure Hash Algorithm). The value is returned as a string of 40 hexadecimal digits or NULL if the argument was NULL. | **SHA1('1234567890')** | 01b307acba4f54f55aafc33bb06bbbf6ca803e9a |
| **SHA2(expr, expr)** | Calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). If the hash length is not one of the permitted values, the return value is NULL. Otherwise, the function result is a hash value containing the desired number of bits as a string of hexadecimal digits. | **SHA2('1234567890', 0)** | c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646 |
| **SIPHASH(expr)** | Produces a 64-bit [SipHash](https://en.wikipedia.org/wiki/SipHash) hash value. | **SIPHASH('1234567890')** | 18110648197875983073 |
| **SIPHASH64(expr)** | Alias for SIPHASH. Produces a 64-bit [SipHash](https://en.wikipedia.org/wiki/SipHash) hash value. | **SIPHASH64('1234567890')** | 18110648197875983073 |
| **XXHASH32(expr)** | Calculates an xxHash32 32-bit hash value for the string. The value is returned as a UInt32 or NULL if the argument was NULL. | **XXHASH32('1234567890')** | 3896585587 |
| **XXHASH64(expr)** | Calculates an xxHash64 64-bit hash value for the string. The value is returned as a UInt64 or NULL if the argument was NULL. | **XXHASH64('1234567890')** | 12237639266330420150 |
33 changes: 0 additions & 33 deletions docs/doc/15-sql-functions/70-hash-functions/md5hash.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/doc/15-sql-functions/70-hash-functions/sha1hash.md

This file was deleted.

49 changes: 0 additions & 49 deletions docs/doc/15-sql-functions/70-hash-functions/sha2hash.md

This file was deleted.

65 changes: 0 additions & 65 deletions docs/doc/15-sql-functions/70-hash-functions/siphash.md

This file was deleted.

33 changes: 0 additions & 33 deletions docs/doc/15-sql-functions/70-hash-functions/xxhash32.md

This file was deleted.

33 changes: 0 additions & 33 deletions docs/doc/15-sql-functions/70-hash-functions/xxhash64.md

This file was deleted.

1 comment on commit aa88e26

@vercel
Copy link

@vercel vercel bot commented on aa88e26 Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

databend – ./

databend-git-main-databend.vercel.app
databend-databend.vercel.app
databend.rs
databend.vercel.app

Please sign in to comment.