matrixorigin / matrixorigin/matrixone
[Refactoring]: ExecProjection is implemented 50 times
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
### Why do you want to refactor this code?
```Markdown
The reason to have a ExecProjection in Operator interface is that projection is such a common thing for most operators, we should just implement it once.
We ends up implement it about 60 times, out of which 50+ is trivial
return input, nil
If the optimizer decided to pull the projection out of each operator and insert a separate node, which is fine (but could be not less efficient), then ExecProjection should not be part of the Operator interface. Otherwise, it should be part of OperatorBase so that we only implement it once.
if porjList == nil {
return input, nil
} else {
// the projection code, only once.
}
```
### Describe the solution you'd like
refactor the code.
### Describe alternatives you've considered
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.