Skip to content

Commit 3416278

Browse files
committed
formatting nits
1 parent 23fafd7 commit 3416278

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • datafusion/proto/src/physical_plan

datafusion/proto/src/physical_plan/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use std::cell::RefCell;
1919
use std::collections::HashMap;
2020
use std::fmt::Debug;
21+
use std::hash::{DefaultHasher, Hash, Hasher};
2122
use std::sync::Arc;
2223

2324
use arrow::compute::SortOptions;
@@ -3772,15 +3773,13 @@ impl PhysicalProtoConverterExtension for DeduplicatingSerializer {
37723773
expr: &Arc<dyn PhysicalExpr>,
37733774
codec: &dyn PhysicalExtensionCodec,
37743775
) -> Result<protobuf::PhysicalExprNode> {
3775-
use std::hash::{Hash, Hasher};
3776-
37773776
let mut proto = serialize_physical_expr_with_converter(expr, codec, self)?;
37783777

37793778
// Hash session_id, pointer address, and process ID together to create expr_id.
37803779
// - session_id: random per serializer, prevents collisions when merging serializations
37813780
// - ptr: unique address per Arc within a process
37823781
// - pid: prevents collisions if serializer is shared across processes
3783-
let mut hasher = std::collections::hash_map::DefaultHasher::new();
3782+
let mut hasher = DefaultHasher::new();
37843783
self.session_id.hash(&mut hasher);
37853784
(Arc::as_ptr(expr) as *const () as u64).hash(&mut hasher);
37863785
std::process::id().hash(&mut hasher);
@@ -3834,7 +3833,6 @@ impl PhysicalProtoConverterExtension for DeduplicatingDeserializer {
38343833
if let Some(cached) = self.cache.borrow().get(&expr_id) {
38353834
return Ok(Arc::clone(cached));
38363835
}
3837-
38383836
// Deserialize and cache
38393837
let expr = parse_physical_expr_with_converter(
38403838
proto,

0 commit comments

Comments
 (0)