comphead commented on code in PR #7732:
URL: https://github.com/apache/arrow-datafusion/pull/7732#discussion_r1350496154


##########
datafusion/expr/src/expr.rs:
##########
@@ -1032,6 +1032,88 @@ impl Expr {
     }
 }
 
+impl Expr {
+    // Operation methods from traits.
+
+    //
+    // Arithmetic operations
+    //
+
+    /// Return `self + other`
+    #[allow(clippy::should_implement_trait)]
+    pub fn add(self, other: Expr) -> Expr {
+        std::ops::Add::add(self, other)
+    }
+
+    /// Return `self - other`
+    #[allow(clippy::should_implement_trait)]
+    pub fn sub(self, other: Expr) -> Expr {
+        std::ops::Sub::sub(self, other)
+    }
+
+    /// Return `self * other`
+    #[allow(clippy::should_implement_trait)]
+    pub fn mul(self, other: Expr) -> Expr {
+        std::ops::Mul::mul(self, other)
+    }
+
+    /// Return `self / other`
+    #[allow(clippy::should_implement_trait)]
+    pub fn div(self, other: Expr) -> Expr {
+        std::ops::Div::div(self, other)
+    }
+
+    /// Return `self % other`
+    pub fn mod_(self, other: Expr) -> Expr {

Review Comment:
   underscore in naming might be confusing



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