All Products
Search
Document Center

Realtime Compute for Apache Flink:MURMUR_HASH_64

Last Updated:Apr 29, 2024

The topic describes how to use the MURMUR_HASH_64 function. This function specifies the 64-bit hash value for a parameter by using the hash128x64 method.

Limits

This function is supported only in Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 3.0.0 or later.

Syntax

BIGINT MURMUR_HASH_64(value)

Input parameters

Parameter

Data type

value

VARCHAR or a numeric value

Examples

Example 1

  • Test data

    Table 1 T1

    id(INT)

    hash_64_value(VARCHAR)

    1

    This is a test String.

    2

    null

    3

    test

  • Test statement

    SELECT id,MURMUR_HASH_64(hash_64_value) as big
    FROM T1;         
  • Test result

    id(INT)

    big(BIGINT)

    1

    2706826604463635000

    2

    -

    3

    5010266691562018000

Example 2

  • Test data

    Table 2. T2

    id(INT)

    hash_64_value(FLOAT)

    1

    4.5

    2

    NULL

    3

    4

  • Test statement

    SELECT MURMUR_HASH_64(hash_64_value) as big
    FROM T2;         
  • Test result

    id(INT)

    big(BIGINT)

    1

    8033179276572535000

    2

    -

    3

    -6697622088025985000

References

For more information about how to specify the 32-bit hash value for a parameter by using the hash32x86 method, see MURMUR_HASH.