File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1574,8 +1574,13 @@ impl Expr {
15741574
15751575 /// Returns true if the expression is volatile, i.e. whether it can return different
15761576 /// results when evaluated multiple times with the same input.
1577- pub fn is_volatile ( & self ) -> Result < bool > {
1578- self . exists ( |expr| Ok ( expr. is_volatile_node ( ) ) )
1577+ ///
1578+ /// For example the function call `RANDOM()` is volatile as each call will
1579+ /// return a different value.
1580+ ///
1581+ /// See [`Volatility`] for more information.
1582+ pub fn is_volatile ( & self ) -> bool {
1583+ self . exists ( |expr| Ok ( expr. is_volatile_node ( ) ) ) . unwrap ( )
15791584 }
15801585
15811586 /// Recursively find all [`Expr::Placeholder`] expressions, and
Original file line number Diff line number Diff line change @@ -1200,7 +1200,7 @@ fn rewrite_projection(
12001200
12011201 ( qualified_name ( qualifier, field. name ( ) ) , expr)
12021202 } )
1203- . partition ( |( _, value) | value. is_volatile ( ) . unwrap_or ( true ) ) ;
1203+ . partition ( |( _, value) | value. is_volatile ( ) ) ;
12041204
12051205 let mut push_predicates = vec ! [ ] ;
12061206 let mut keep_predicates = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments