xudong963 commented on code in PR #17351: URL: https://github.com/apache/datafusion/pull/17351#discussion_r2324227931
########## datafusion/physical-expr-common/src/physical_expr.rs: ########## @@ -377,6 +377,19 @@ pub trait PhysicalExpr: Any + Send + Sync + Display + Debug + DynEq + DynHash { // static expressions will always return 0. 0 } + + /// Returns true if the expression node is volatile, i.e. whether it can return + /// different results when evaluated multiple times with the same input. + /// + /// Note: unlike [`is_volatile`], this function does not consider inputs: + /// - `random()` returns `true`, + /// - `a + random()` returns `false` Review Comment: ```suggestion /// - `a + random()` returns `false` (becuase the operation `+` itself is not volatile.) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org