@@ -69,31 +69,31 @@ class BloomFilter {
69
69
// /
70
70
// / @param value the value to hash.
71
71
// / @return hash result.
72
- virtual uint64_t hash (int32_t value) const = 0;
72
+ virtual uint64_t hashInt32 (int32_t value) const = 0;
73
73
74
74
// / Compute hash for 64 bits value by using its plain encoding result.
75
75
// /
76
76
// / @param value the value to hash.
77
77
// / @return hash result.
78
- virtual uint64_t hash (int64_t value) const = 0;
78
+ virtual uint64_t hashInt64 (int64_t value) const = 0;
79
79
80
80
// / Compute hash for float value by using its plain encoding result.
81
81
// /
82
82
// / @param value the value to hash.
83
83
// / @return hash result.
84
- virtual uint64_t hash (float value) const = 0;
84
+ virtual uint64_t hashFloat (float value) const = 0;
85
85
86
86
// / Compute hash for double value by using its plain encoding result.
87
87
// /
88
88
// / @param value the value to hash.
89
89
// / @return hash result.
90
- virtual uint64_t hash (double value) const = 0;
90
+ virtual uint64_t hashDouble (double value) const = 0;
91
91
92
92
// / Compute hash for bytearray by using its plain encoding result.
93
93
// /
94
94
// / @param value the value to hash.
95
95
// / @return hash result.
96
- virtual uint64_t hash (const ByteArray* value) const = 0;
96
+ virtual uint64_t hashByteArray (const ByteArray* value) const = 0;
97
97
98
98
// / Batch compute hashes for 32 bits values by using its plain encoding
99
99
// / result.
@@ -102,8 +102,8 @@ class BloomFilter {
102
102
// / @param num_values the number of values to hash.
103
103
// / @param hashes a pointer to the output hash values, its length should be
104
104
// / equal to num_values.
105
- virtual void hashes ( const int32_t * values, int numValues, uint64_t * hashes)
106
- const = 0;
105
+ virtual void
106
+ hashesInt32 ( const int32_t * values, int numValues, uint64_t * hashes) const = 0 ;
107
107
108
108
// / Batch compute hashes for 64 bits values by using its plain encoding
109
109
// / result.
@@ -112,16 +112,16 @@ class BloomFilter {
112
112
// / @param num_values the number of values to hash.
113
113
// / @param hashes a pointer to the output hash values, its length should be
114
114
// / equal to num_values.
115
- virtual void hashes ( const int64_t * values, int numValues, uint64_t * hashes)
116
- const = 0;
115
+ virtual void
116
+ hashesInt64 ( const int64_t * values, int numValues, uint64_t * hashes) const = 0 ;
117
117
118
118
// / Batch compute hashes for float values by using its plain encoding result.
119
119
// /
120
120
// / @param values values a pointer to the values to hash.
121
121
// / @param num_values the number of values to hash.
122
122
// / @param hashes a pointer to the output hash values, its length should be
123
123
// / equal to num_values.
124
- virtual void hashes (const float * values, int numValues, uint64_t * hashes)
124
+ virtual void hashesFloat (const float * values, int numValues, uint64_t * hashes)
125
125
const = 0;
126
126
127
127
// / Batch compute hashes for double values by using its plain encoding result.
@@ -130,8 +130,8 @@ class BloomFilter {
130
130
// / @param num_values the number of values to hash.
131
131
// / @param hashes a pointer to the output hash values, its length should be
132
132
// / equal to num_values.
133
- virtual void hashes ( const double * values, int numValues, uint64_t * hashes)
134
- const = 0;
133
+ virtual void
134
+ hashesDouble ( const double * values, int numValues, uint64_t * hashes) const = 0 ;
135
135
136
136
// / Batch compute hashes for bytearray values by using its plain encoding
137
137
// / result.
@@ -140,8 +140,10 @@ class BloomFilter {
140
140
// / @param num_values the number of values to hash.
141
141
// / @param hashes a pointer to the output hash values, its length should be
142
142
// / equal to num_values.
143
- virtual void hashes (const ByteArray* values, int numValues, uint64_t * hashes)
144
- const = 0;
143
+ virtual void hashesByteArray (
144
+ const ByteArray* values,
145
+ int numValues,
146
+ uint64_t * hashes) const = 0;
145
147
146
148
virtual ~BloomFilter () = default ;
147
149
@@ -249,54 +251,41 @@ class BlockSplitBloomFilter : public BloomFilter {
249
251
return numBytes_;
250
252
}
251
253
252
- uint64_t hash (int32_t value) const override {
253
- return hasher_->hash (value);
254
+ uint64_t hashInt32 (int32_t value) const override {
255
+ return hasher_->hashInt32 (value);
254
256
}
255
- uint64_t hash (int64_t value) const override {
256
- return hasher_->hash (value);
257
+ uint64_t hashInt64 (int64_t value) const override {
258
+ return hasher_->hashInt64 (value);
257
259
}
258
- uint64_t hash (float value) const override {
259
- return hasher_->hash (value);
260
+ uint64_t hashFloat (float value) const override {
261
+ return hasher_->hashFloat (value);
260
262
}
261
- uint64_t hash (double value) const override {
262
- return hasher_->hash (value);
263
+ uint64_t hashDouble (double value) const override {
264
+ return hasher_->hashDouble (value);
263
265
}
264
- uint64_t hash (const ByteArray* value) const override {
265
- return hasher_->hash (value);
266
+ uint64_t hashByteArray (const ByteArray* value) const override {
267
+ return hasher_->hashByteArray (value);
266
268
}
267
269
268
- void hashes (const int32_t * values, int numValues, uint64_t * hashes)
270
+ void hashesInt32 (const int32_t * values, int numValues, uint64_t * hashes)
269
271
const override {
270
- hasher_->hashes (values, numValues, hashes);
272
+ hasher_->hashesInt32 (values, numValues, hashes);
271
273
}
272
- void hashes (const int64_t * values, int numValues, uint64_t * hashes)
274
+ void hashesInt64 (const int64_t * values, int numValues, uint64_t * hashes)
273
275
const override {
274
- hasher_->hashes (values, numValues, hashes);
276
+ hasher_->hashesInt64 (values, numValues, hashes);
275
277
}
276
- void hashes (const float * values, int numValues, uint64_t * hashes)
278
+ void hashesFloat (const float * values, int numValues, uint64_t * hashes)
277
279
const override {
278
- hasher_->hashes (values, numValues, hashes);
280
+ hasher_->hashesFloat (values, numValues, hashes);
279
281
}
280
- void hashes (const double * values, int numValues, uint64_t * hashes)
282
+ void hashesDouble (const double * values, int numValues, uint64_t * hashes)
281
283
const override {
282
- hasher_->hashes (values, numValues, hashes);
284
+ hasher_->hashesDouble (values, numValues, hashes);
283
285
}
284
- void hashes (const ByteArray* values, int numValues, uint64_t * hashes)
286
+ void hashesByteArray (const ByteArray* values, int numValues, uint64_t * hashes)
285
287
const override {
286
- hasher_->hashes (values, numValues, hashes);
287
- }
288
-
289
- uint64_t hash (const int32_t * value) const {
290
- return hasher_->hash (*value);
291
- }
292
- uint64_t hash (const int64_t * value) const {
293
- return hasher_->hash (*value);
294
- }
295
- uint64_t hash (const float * value) const {
296
- return hasher_->hash (*value);
297
- }
298
- uint64_t hash (const double * value) const {
299
- return hasher_->hash (*value);
288
+ hasher_->hashesByteArray (values, numValues, hashes);
300
289
}
301
290
302
291
// / Deserialize the Bloom filter from an input stream. It is used when
0 commit comments