blob: 051a5c262ff5ac49303c448ed3872a1da50e37fd [file] [log] [blame] [view]
---
{
"title": "MURMUR_HASH3_32",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## murmur_hash3_32
### description
#### Syntax
`INT MURMUR_HASH3_32(VARCHAR input, ...)`
Return the 32 bits murmur3 hash of input string.
Note: When calculating hash values, it is more recommended to use `xxhash_32` instead of `murmur_hash3_32`.
### example
```
mysql> select murmur_hash3_32(null);
+-----------------------+
| murmur_hash3_32(NULL) |
+-----------------------+
| NULL |
+-----------------------+
mysql> select murmur_hash3_32("hello");
+--------------------------+
| murmur_hash3_32('hello') |
+--------------------------+
| 1321743225 |
+--------------------------+
mysql> select murmur_hash3_32("hello", "world");
+-----------------------------------+
| murmur_hash3_32('hello', 'world') |
+-----------------------------------+
| 984713481 |
+-----------------------------------+
```
### keywords
MURMUR_HASH3_32,HASH