datafusion_common::cse

Trait HashNode

Source
pub trait HashNode {
    // Required method
    fn hash_node<H: Hasher>(&self, state: &mut H);
}
Expand description

Hashes the direct content of an TreeNode without recursing into its children.

This method is useful to incrementally compute hashes, such as in CSE which builds a deep hash of a node and its descendants during the bottom-up phase of the first traversal and so avoid computing the hash of the node and then the hash of its descendants separately.

If a node doesn’t have any children then the value returned by hash_node() is similar to ’.hash()`, but not necessarily returns the same value.

Required Methods§

Source

fn hash_node<H: Hasher>(&self, state: &mut H)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: HashNode + ?Sized> HashNode for Arc<T>

Source§

fn hash_node<H: Hasher>(&self, state: &mut H)

Implementors§