Commit 96321e6
committed
feat: add StructLikeSet for deduplicating StructLike rows
Adds StructLikeSet<bool kValidate = true>, a hash set for StructLike
rows backed by an internal arena allocator.
Key design points:
- Deep-copies inserted rows into a monotonic_buffer_resource arena;
string data and nested struct/list/map scalars are fully materialized
so the set owns its memory independently of the caller
- Transparent heterogeneous lookup: Contains() does not allocate a
temporary key
- Hash and equality semantics match the Java reference implementation
(String.hashCode, StructLikeHash, ListHash; float/double use
canonical NaN bits and distinguish ±0.0)
- Schema validation (field count + scalar type) on Insert/Contains;
can be disabled via kValidate=false (UncheckedStructLikeSet) when
the caller guarantees conformance
- Internal Arena wrapper containers use std::pmr::vector1 parent 0596ef5 commit 96321e6
File tree
7 files changed
+1124
-0
lines changed- src/iceberg
- test
- util
7 files changed
+1124
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
0 commit comments