alamb commented on code in PR #13206:
URL: https://github.com/apache/datafusion/pull/13206#discussion_r1826051800


##########
datafusion/expr/src/expr.rs:
##########
@@ -1574,8 +1574,13 @@ impl Expr {
 
     /// Returns true if the expression is volatile, i.e. whether it can return 
different
     /// results when evaluated multiple times with the same input.
-    pub fn is_volatile(&self) -> Result<bool> {
-        self.exists(|expr| Ok(expr.is_volatile_node()))
+    ///
+    /// For example the function call `RANDOM()` is volatile as each call will
+    /// return a different value.
+    ///
+    /// See [`Volatility`] for more information.
+    pub fn is_volatile(&self) -> bool {
+        self.exists(|expr| Ok(expr.is_volatile_node())).unwrap()

Review Comment:
   I will add the comment in a follow on PR The non fallable exists variant is 
an interesting idea -- maybe we can file a follow on issue for it



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to