[
https://issues.apache.org/jira/browse/BEAM-10074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Darshan Jani updated BEAM-10074:
--------------------------------
Description:
I would like to propose hash functions:
Optionally we can also add for below functions variants which return hex string
instead of bytes.
# MD5
Calculates an MD5 128-bit checksum of string or bytes and returns it as a bytes
{code:java}
SELECT MD5("Some String") as md5;
{code}
# SHA1
Calculates a SHA-1 hash value of string or bytes and returns it as a bytes.
{code:java}
SELECT SHA1("Some String") as sha1;
{code}
# SHA256
Calculates a SHA-256 hash value of string or bytes and returns it as a bytes
{code:java}
SELECT SHA256("Some String") as sha256;
{code}
# SHA512
Calculates a SHA-512 hash value of string or bytes and returns it as a bytes.
{code:java}
SELECT SHA512("Some String") as sha512;
{code}
was:
I would like to propose hash functions:
# MD5
Calculates an MD5 128-bit checksum of string or bytes and returns it as a bytes
{code:java}
SELECT MD5("Some String") as md5;
{code}
# SHA1
Calculates a SHA-1 hash value of string or bytes and returns it as a bytes.
{code:java}
SELECT SHA1("Some String") as sha1;
{code}
# SHA256
Calculates a SHA-256 hash value of string or bytes and returns it as a bytes
{code:java}
SELECT SHA256("Some String") as sha256;
{code}
# SHA512
Calculates a SHA-512 hash value of string or bytes and returns it as a bytes.
{code:java}
SELECT SHA512("Some String") as sha512;
{code}
> Hash Functions in BeamSQL
> -------------------------
>
> Key: BEAM-10074
> URL: https://issues.apache.org/jira/browse/BEAM-10074
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql
> Reporter: Darshan Jani
> Assignee: Darshan Jani
> Priority: P2
>
> I would like to propose hash functions:
> Optionally we can also add for below functions variants which return hex
> string instead of bytes.
> # MD5
> Calculates an MD5 128-bit checksum of string or bytes and returns it as a
> bytes
> {code:java}
> SELECT MD5("Some String") as md5;
> {code}
> # SHA1
> Calculates a SHA-1 hash value of string or bytes and returns it as a bytes.
> {code:java}
> SELECT SHA1("Some String") as sha1;
> {code}
> # SHA256
> Calculates a SHA-256 hash value of string or bytes and returns it as a bytes
> {code:java}
> SELECT SHA256("Some String") as sha256;
> {code}
> # SHA512
> Calculates a SHA-512 hash value of string or bytes and returns it as a bytes.
> {code:java}
> SELECT SHA512("Some String") as sha512;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)