-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86b7676
commit c62d69e
Showing
5 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
description: This section contains reference documentation for UTF8 encode/decode functions. | ||
--- | ||
|
||
# UTF8 | ||
|
||
* `fromUtf8` returns UTF8 encoded string of input binary data (`bytes` type). | ||
* `toUtf8` returns binary data (represented as a Hex string) from a UTF8 encoded string. | ||
|
||
## Signature | ||
|
||
> fromUtf8(bytesCol) | ||
> | ||
> toUtf8(string) | ||
## Usage Examples | ||
|
||
```sql | ||
SELECT bytesCol1, fromUtf8(bytesCol1) AS utf8Str | ||
FROM testTable | ||
LIMIT 1 | ||
``` | ||
| bytesCol1 | utf8Str| | ||
|-------------|--------| | ||
| 68656c6c6f21| hello! | | ||
|
||
```sql | ||
SELECT toUtf8('hello!') AS binaryOutput | ||
FROM ignoreMe | ||
``` | ||
|
||
| binaryOutput | | ||
|--------------| | ||
| 68656c6c6f21 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters