Skip to content

Commit 63bbe1d

Browse files
committed
hash
1 parent 7944645 commit 63bbe1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+88
-0
lines changed

datafusion-examples/examples/advanced_udf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ impl ScalarUDFImpl for PowUdf {
210210
fn hash_value(&self) -> u64 {
211211
let Self { signature, aliases } = self;
212212
let mut hasher = DefaultHasher::new();
213+
std::any::type_name::<Self>().hash(&mut hasher);
213214
signature.hash(&mut hasher);
214215
aliases.hash(&mut hasher);
215216
hasher.finish()

datafusion-examples/examples/function_factory.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ impl ScalarUDFImpl for ScalarFunctionWrapper {
179179
return_type,
180180
} = self;
181181
let mut hasher = DefaultHasher::new();
182+
std::any::type_name::<Self>().hash(&mut hasher);
182183
name.hash(&mut hasher);
183184
expr.hash(&mut hasher);
184185
signature.hash(&mut hasher);

datafusion/core/tests/user_defined/user_defined_scalar_functions.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ impl ScalarUDFImpl for Simple0ArgsScalarUDF {
239239
return_type,
240240
} = self;
241241
let mut hasher = DefaultHasher::new();
242+
std::any::type_name::<Self>().hash(&mut hasher);
242243
name.hash(&mut hasher);
243244
signature.hash(&mut hasher);
244245
return_type.hash(&mut hasher);
@@ -606,6 +607,7 @@ impl ScalarUDFImpl for AddIndexToStringVolatileScalarUDF {
606607
return_type,
607608
} = self;
608609
let mut hasher = DefaultHasher::new();
610+
std::any::type_name::<Self>().hash(&mut hasher);
609611
name.hash(&mut hasher);
610612
signature.hash(&mut hasher);
611613
return_type.hash(&mut hasher);
@@ -1053,6 +1055,7 @@ impl ScalarUDFImpl for ScalarFunctionWrapper {
10531055
return_type,
10541056
} = self;
10551057
let mut hasher = DefaultHasher::new();
1058+
std::any::type_name::<Self>().hash(&mut hasher);
10561059
name.hash(&mut hasher);
10571060
expr.hash(&mut hasher);
10581061
signature.hash(&mut hasher);
@@ -1788,6 +1791,7 @@ impl ScalarUDFImpl for ExtensionBasedUdf {
17881791
fn hash_value(&self) -> u64 {
17891792
let Self { name, signature } = self;
17901793
let mut hasher = DefaultHasher::new();
1794+
std::any::type_name::<Self>().hash(&mut hasher);
17911795
name.hash(&mut hasher);
17921796
signature.hash(&mut hasher);
17931797
hasher.finish()

datafusion/expr/src/expr_fn.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ impl ScalarUDFImpl for SimpleScalarUDF {
500500
fun,
501501
} = self;
502502
let mut hasher = DefaultHasher::new();
503+
std::any::type_name::<Self>().hash(&mut hasher);
503504
name.hash(&mut hasher);
504505
signature.hash(&mut hasher);
505506
return_type.hash(&mut hasher);
@@ -654,6 +655,7 @@ impl AggregateUDFImpl for SimpleAggregateUDF {
654655
state_fields,
655656
} = self;
656657
let mut hasher = DefaultHasher::new();
658+
std::any::type_name::<Self>().hash(&mut hasher);
657659
name.hash(&mut hasher);
658660
signature.hash(&mut hasher);
659661
return_type.hash(&mut hasher);
@@ -781,6 +783,7 @@ impl WindowUDFImpl for SimpleWindowUDF {
781783
partition_evaluator_factory,
782784
} = self;
783785
let mut hasher = DefaultHasher::new();
786+
std::any::type_name::<Self>().hash(&mut hasher);
784787
name.hash(&mut hasher);
785788
signature.hash(&mut hasher);
786789
return_type.hash(&mut hasher);

datafusion/expr/src/test/function_stub.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ impl AggregateUDFImpl for Count {
284284
fn hash_value(&self) -> u64 {
285285
let Self { signature, aliases } = self;
286286
let mut hasher = DefaultHasher::new();
287+
std::any::type_name::<Self>().hash(&mut hasher);
287288
signature.hash(&mut hasher);
288289
aliases.hash(&mut hasher);
289290
hasher.finish()
@@ -518,6 +519,7 @@ impl AggregateUDFImpl for Avg {
518519
fn hash_value(&self) -> u64 {
519520
let Self { signature, aliases } = self;
520521
let mut hasher = DefaultHasher::new();
522+
std::any::type_name::<Self>().hash(&mut hasher);
521523
signature.hash(&mut hasher);
522524
aliases.hash(&mut hasher);
523525
hasher.finish()

datafusion/ffi/src/udaf/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ impl AggregateUDFImpl for ForeignAggregateUDF {
575575
udaf,
576576
} = self;
577577
let mut hasher = DefaultHasher::new();
578+
std::any::type_name::<Self>().hash(&mut hasher);
578579
signature.hash(&mut hasher);
579580
aliases.hash(&mut hasher);
580581
std::ptr::hash(udaf, &mut hasher);

datafusion/ffi/src/udf/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ impl ScalarUDFImpl for ForeignScalarUDF {
433433
signature,
434434
} = self;
435435
let mut hasher = DefaultHasher::new();
436+
std::any::type_name::<Self>().hash(&mut hasher);
436437
name.hash(&mut hasher);
437438
aliases.hash(&mut hasher);
438439
std::ptr::hash(udf, &mut hasher);

datafusion/ffi/src/udwf/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ impl WindowUDFImpl for ForeignWindowUDF {
359359
signature,
360360
} = self;
361361
let mut hasher = DefaultHasher::new();
362+
std::any::type_name::<Self>().hash(&mut hasher);
362363
name.hash(&mut hasher);
363364
aliases.hash(&mut hasher);
364365
std::ptr::hash(udf, &mut hasher);

datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ impl AggregateUDFImpl for ApproxPercentileContWithWeight {
206206
approx_percentile_cont,
207207
} = self;
208208
let mut hasher = DefaultHasher::new();
209+
std::any::type_name::<Self>().hash(&mut hasher);
209210
signature.hash(&mut hasher);
210211
hasher.write_u64(approx_percentile_cont.hash_value());
211212
hasher.finish()

datafusion/functions-aggregate/src/average.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ impl AggregateUDFImpl for Avg {
322322
fn hash_value(&self) -> u64 {
323323
let Self { signature, aliases } = self;
324324
let mut hasher = DefaultHasher::new();
325+
std::any::type_name::<Self>().hash(&mut hasher);
325326
signature.hash(&mut hasher);
326327
aliases.hash(&mut hasher);
327328
hasher.finish()

0 commit comments

Comments
 (0)