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


##########
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:
   I think it's better to call this `is_pure()` and use `!is_pure()` where 
impurity is being checked.



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