doris
doris copied to clipboard
[enhancement](Nereids) support StatementContext, SET_VAR, and Plan pre/post processor
Proposed changes
- add
StatementContext, andPlannerContextis renamed toCascadsContext.CascadsContextbelong to aStatementContext, andStatementContextbelong to aConnectionContext, and the lifecycle increases in turn. StatementContext can wrap some statement's lifecycle-related state, such as ExpressionId, TableLock.MemoTestUtilcan simplify create a CascadesContext and Memo for test. - add
PlanPreprocessorto process parsed logical plan before copy into memo. and add aPlanPostprocessorto process physical plan after copy out from memo. - utilize PlanPreprocessor to process SET_VAR hint, the class is
EliminateLogicalSelectHint - pass the limit clause in regression test case, in
set_var.groovy
Checklist(Required)
- Does it affect the original behavior:
- [ ] Yes
- [x] No
- [ ] I don't know
- Has unit tests been added:
- [x] Yes
- [ ] No
- [ ] No Need
- Has document been added or modified:
- [ ] Yes
- [ ] No
- [x] No Need
- Does it need to update dependencies:
- [ ] Yes
- [x] No
- Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [x] No