| 3005 | PG_FUNCTION_INFO_V1(hll_hash_2byte); |
| 3006 | Datum hll_hash_2byte(PG_FUNCTION_ARGS); |
| 3007 | Datum |
| 3008 | hll_hash_2byte(PG_FUNCTION_ARGS) |
| 3009 | { |
| 3010 | int16 key = PG_GETARG_INT16(0); |
| 3011 | int32 seed = PG_GETARG_INT32(1); |
| 3012 | uint64 out[2]; |
| 3013 | |
| 3014 | if (seed < 0) |
| 3015 | ereport(WARNING, |
| 3016 | (errcode(ERRCODE_WARNING), |
| 3017 | errmsg("negative seed values not compatible"))); |
| 3018 | |
| 3019 | MurmurHash3_x64_128(&key, sizeof(key), seed, out); |
| 3020 | |
| 3021 | PG_RETURN_INT64(out[0]); |
| 3022 | } |
| 3023 | |
| 3024 | // Hash a 4 byte fixed-size object. |
| 3025 | // |
nothing calls this directly
no test coverage detected