1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! XXH3 hashing — the one owner in the workspace.
//!
//! Both ends compute the global group key and the engine alone computes the
//! rest (the wide-PK routing hash, shard and manifest header digests, row and
//! group identity). They live together because a second XXH3
//! definition elsewhere could drift from this one with nothing to catch it:
//! `global_group_key` and `FoldCols::key_row` have to agree bit for bit across
//! the wire, and they only do so by calling the same function.
use ;
/// XXH3-64 over `b` — the wide-PK routing hash, and the engine's shard body
/// checksum.
/// XXH3-128 over arbitrary bytes (no seed). Full 128-bit image — use where a
/// 64-bit birthday bound is too low, e.g. a string content join key (a 64-bit
/// hash widened to 128 bits has a ~2^32-row collision window that would silently
/// equijoin distinct strings).
/// `V₀` — the group key of the ungrouped (global) aggregate: the digest over no
/// group columns at all. Every row keyed at V₀ — a global reduce's row and the
/// FROM-less SELECT's constant row — carries this key, with no literal embedded
/// on either end.
/// XXH3-64 over `seed` followed by `buf` with the eight bytes at `hole`
/// excluded — the shape a self-describing file header needs, since the field
/// holding the digest cannot be part of it. `seed` binds the digest to
/// something outside the buffer; pass `&[]` where there is nothing to bind to.
///
/// Writer and reader call this identically, so neither can restate the hashed
/// span differently from the other.
/// The digest of a physical row layout — its PK list and every column's type
/// code — that a read's reply layout is checked by.
/// Streaming XXH3: `.digest()` over a sequence of updates equals [`checksum`]
/// over their concatenation — the shard writer's body checksum.
pub use Xxh3Default as RowHasher;