doris icon indicating copy to clipboard operation
doris copied to clipboard

[enhancement](Nereids) support StatementContext, SET_VAR, and Plan pre/post processor

Open 924060929 opened this issue 3 years ago • 0 comments

Proposed changes

  1. add StatementContext, and PlannerContext is renamed to CascadsContext. CascadsContext belong to a StatementContext, and StatementContext belong to a ConnectionContext, and the lifecycle increases in turn. StatementContext can wrap some statement's lifecycle-related state, such as ExpressionId, TableLock. MemoTestUtil can simplify create a CascadesContext and Memo for test.
  2. add PlanPreprocessor to process parsed logical plan before copy into memo. and add a PlanPostprocessor to process physical plan after copy out from memo.
  3. utilize PlanPreprocessor to process SET_VAR hint, the class is EliminateLogicalSelectHint
  4. pass the limit clause in regression test case, in set_var.groovy

Checklist(Required)

  1. Does it affect the original behavior:
    • [ ] Yes
    • [x] No
    • [ ] I don't know
  2. Has unit tests been added:
    • [x] Yes
    • [ ] No
    • [ ] No Need
  3. Has document been added or modified:
    • [ ] Yes
    • [ ] No
    • [x] No Need
  4. Does it need to update dependencies:
    • [ ] Yes
    • [x] No
  5. Are there any changes that cannot be rolled back:
    • [ ] Yes (If Yes, please explain WHY)
    • [x] No

924060929 avatar Aug 10 '22 12:08 924060929