MCPcopy Create free account
hub / github.com/citusdata/postgresql-hll / hll_hash_2byte

Function hll_hash_2byte

src/hll.c:3007–3022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3005PG_FUNCTION_INFO_V1(hll_hash_2byte);
3006Datum hll_hash_2byte(PG_FUNCTION_ARGS);
3007Datum
3008hll_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//

Callers

nothing calls this directly

Calls 1

MurmurHash3_x64_128Function · 0.85

Tested by

no test coverage detected