[Discuss] Different implementation style between Expr, LogicalPlan and ExecutionPlan
- Lenguaje dominante
- Rust
- Estrellas
- 9.3k
- Forks
- 2.4k
- Merge medio
- 3 d 11 h
- PR fusionados (30 d)
- 360
Descripción
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
In current DataFusion code base, `Expr`, `LogicalPlan` and `ExecutionPlan` are represented in different ways. Actually they are all tree based structures. `Expr` and `LogicalPlan` are Enums, `ExecutionPlan` is a Trait.
The LogicalPlan enum wrapped the different logical operator structs like Projection and Filter, etc.
````
pub enum LogicalPlan {
Projection(Projection),
Filter(Filter),
............
}
````
But the Expr enum doesn't wrap the expression structs and define the different expressions directly in the enum.
````
pub enum Expr {
Alias(Box, String),
Column(Column),
............
AggregateFunction {
fun: aggregate_function::AggregateFunction,
args: Vec,
distinct: bool,
},
WindowFunction {
fun: window_function::WindowFunction,
args: Vec,
partition_by: Vec,
order_by: Vec,
window_frame: Option,
},
............
}
````
I think we should unify the coding style, at least the Expr and LogicalPlan representations should follow the same style. And for physical ExecutionPlan, it is Trait/Trait Objects, I would prefer to use Enum also. Want to hear thoughts from other members.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Guía de contribución
Línea de trabajo
Empieza comparando las definiciones de Expr, LogicalPlan y ExecutionPlan descritas en el issue y revisa las representaciones de árbol circundantes. El issue es una discusión de diseño en lugar de una tarea de implementación con un alcance delimitado; para darlo por terminado harían falta un acuerdo sobre una representación unificada y un alcance de migración definido.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- data-engineering
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100