optimize: decouple saga expression handling and remove evaluator package #5966
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ⅰ. Describe what this PR did
The current expression structure (as observed following) is actually quite fragmented, mainly due to the fact that the expression structure processing logic is currently scattered across invocations without a centralized intermediary layer to parse it.
Thus, this PR consolidate the parsing of expression structures and adopts the expression structure in the green box in the figure on a backward-compatible basis.
Besides, the differences between the expression and evaluation packages are minimal, as both are used to handle expressions, mainly differing in return values. In fact, they can both be unified under the expression category. Separating them into two systems actually increases developers' understanding cost of the code.
Ⅱ. Does this pull request fix one issue?
fixes #5436
Ⅲ. Why don't you add test cases (unit test/integration test)?
This optimization is purely a code optimization, without adding any new functionality. It can be verified through existing saga tests. The expected behavior is the same as usual.
Ⅳ. Describe how to verify it
By existing saga tests.
Ⅴ. Special notes for reviews
Same as pr #5850