felipecrv commented on code in PR #40396:
URL: https://github.com/apache/arrow/pull/40396#discussion_r1527393807


##########
cpp/src/arrow/compute/function.h:
##########
@@ -229,6 +229,12 @@ class ARROW_EXPORT Function {
 
   virtual Status Validate() const;
 
+  /// \brief Returns the pure property for this function.
+  ///
+  /// For impure functions like 'random', we should skip any simplification
+  /// for this function except it's arguments.
+  virtual bool is_impure() const { return false; }

Review Comment:
   And instead of `bool is_impure = false` variables we would have `bool 
is_pure = true`. Less negation overall.



-- 
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]

Reply via email to