sadboy commented on code in PR #7942:
URL: https://github.com/apache/arrow-datafusion/pull/7942#discussion_r1432926780


##########
datafusion/expr/src/expr.rs:
##########
@@ -81,8 +81,10 @@ use std::sync::Arc;
 ///   assert_eq!(binary_expr.op, Operator::Eq);
 /// }
 /// ```
-#[derive(Clone, PartialEq, Eq, Hash, Debug)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug, Default)]
 pub enum Expr {
+    #[default]

Review Comment:
   > needed a dummy Expr
   
   If it's just for this purpose, then I think the `Null` literal should serve 
it well enough:
   ```
   impl Default for Expr {
       fn default() -> Self {
           Expr::Literal(ScalarValue::Null)
       }
   }
   ```
   
   As @alamb mentioned above, there is a (relatively high) cost to introducing 
new Expr variants, as it increases potential invalid states along every step of 
the analyzer/optimizer pipeline.



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