Skip to content

Commit 5b749c4

Browse files
committed
fix docs, fix ScalarFunctionExpr::hash_node()
1 parent 29079c8 commit 5b749c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

datafusion/common/src/cse.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,12 @@ impl<'n, N: HashNode> Identifier<'n, N> {
121121
type IdArray<'n, N> = Vec<(usize, Option<Identifier<'n, N>>)>;
122122

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

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

131132
type ChildrenList<N> = (Vec<N>, Vec<N>);

datafusion/physical-expr/src/scalar_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl HashNode for ScalarFunctionExpr {
223223
self.name.hash(state);
224224
self.return_type.hash(state);
225225
self.nullable.hash(state);
226-
// Add `self.fun` when hash is available
226+
self.fun.hash(state);
227227
}
228228
}
229229

0 commit comments

Comments
 (0)