Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code optimization for shardingsphere-shadow project #11282

Closed
soulasuna opened this issue Jul 12, 2021 · 1 comment
Closed

Code optimization for shardingsphere-shadow project #11282

soulasuna opened this issue Jul 12, 2021 · 1 comment

Comments

@soulasuna
Copy link
Contributor

Code optimization for shardingsphere-shadow project

Optimization goal to improve code robustness and readability

Optimization direction

  • Perform type judgment before forced type conversion to avoid type conversion failure.

  • Reduce nested if judgments. The logic is clearer and easier to read.

  • Optimize large methods with complex logic and increase the readable lines for multiple small methods.

@TeslaCN TeslaCN added this to the 5.0.0-RC1 milestone Jul 12, 2021
tristaZero pushed a commit that referenced this issue Jul 13, 2021
* Add junit test method for ShadowConditionEngine

* Optimize the code under the rewrite package

* Fix code format

* Optimize the readability of ShadowSQLRouter.

* Streamline the code in ShadowSQLRewriteContextDecorator.

* Streamline the code in class ShadowSQLRewriteContextDecorator.
@soulasuna
Copy link
Contributor Author

Refactor shadow. see #11661

@menghaoranss menghaoranss modified the milestones: 5.0.0-RC1, 5.0.0 Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants