Skip to content

Commit

Permalink
fix docs, fix ScalarFunctionExpr::hash_node()
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-toth committed Oct 21, 2024
1 parent 29079c8 commit 5b749c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions datafusion/common/src/cse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ impl<'n, N: HashNode> Identifier<'n, N> {
type IdArray<'n, N> = Vec<(usize, Option<Identifier<'n, N>>)>;

/// A map that contains the number of normal and conditional occurrences of [`TreeNode`]s
/// by their identifiers.
/// by their identifiers. It also contains the position of a [`TreeNode`] in
/// [`CommonNodes`] once a node is found to be common and got extracted.
type NodeStats<'n, N> = HashMap<Identifier<'n, N>, (usize, usize, Option<usize>)>;

/// A map that contains the common [`TreeNode`]s and their alias by their identifiers,
/// extracted during the second, rewriting traversal.
/// A list that contains the common [`TreeNode`]s and their alias, extracted during the
/// second, rewriting traversal.
type CommonNodes<'n, N> = Vec<(N, String)>;

type ChildrenList<N> = (Vec<N>, Vec<N>);
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/scalar_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl HashNode for ScalarFunctionExpr {
self.name.hash(state);
self.return_type.hash(state);
self.nullable.hash(state);
// Add `self.fun` when hash is available
self.fun.hash(state);
}
}

Expand Down

0 comments on commit 5b749c4

Please sign in to comment.