andygrove opened a new issue, #3807:
URL: https://github.com/apache/arrow-datafusion/issues/3807

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   See the discussion at https://github.com/apache/arrow-datafusion/issues/2175 
for background context, but the basic issue is that there are different styles 
between `LogicalPlan` and `Expr`.
   
   ## LogicalPlan
   
   Each variant in LogicalPlan wraps a struct. The structs typically have 
`try_new` methods with some validation logic.
   
   ```rust
   pub enum LogicalPlan {
       Projection(Projection),
       Filter(Filter),
       ..
   }
   ```
   
   ## Expr
   
   Expr has a mixed style. Some variants wrap structs and some do not.
   
   ```rust
   pub enum Expr {
       Alias(Box<Expr>, String),
       Column(Column),
       Between {
           /// The value to compare
           expr: Box<Expr>,
           /// Whether the expression is negated
           negated: bool,
           /// The low end of the range
           low: Box<Expr>,
           /// The high end of the range
           high: Box<Expr>,
       },
       Like {
           negated: bool,
           expr: Box<Expr>,
           pattern: Box<Expr>,
           escape_char: Option<char>,
       },
   ```
   
   **Describe the solution you'd like**
   We would like each variant in `Expr` to wrap a struct and add `new` and/or 
`try_new` methods to those structs as appropriate.
   
   **Describe alternatives you've considered**
   Do nothing
   
   **Additional context**
   None
   


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