-
Notifications
You must be signed in to change notification settings - Fork 217
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
[refactoring] refactoring code #480
Comments
[summary] `executor` code has poor readability currently, we need refactoring the code. [test case] src/executor/executor_test.go src/executor/select_executor_test.go src/executor/union_executor_test.go src/executor/engine/join_engine_test.go src/executor/engine/merge_engine_test.go src/executor/engine/union_engine_test.go src/executor/engine/operator/aggregate_operator_test.go src/executor/engine/operator/limit_operator_test.go src/executor/engine/operator/orderby_operator_test.go [patch codecov] src/executor/select_executor.go 100% src/executor/union_executor.go 100% src/executor/engine/common.go 81.8% src/executor/engine/join_engine.go 92.1% src/executor/engine/merge_engine.go 92.5% src/executor/engine/merge_join.go 97.2% src/executor/engine/plan_engine.go 100% src/executor/engine/union_engine.go 85.7% src/executor/engine/operator/aggregate_operator.go 98.1% src/executor/engine/operator/limit_operator.go 100% src/executor/engine/operator/operator.go 78.6% src/executor/engine/operator/orderby_operator.go 83.3%
[summary] `executor` code has poor readability currently, we need refactoring the code. [test case] src/executor/executor_test.go src/executor/select_executor_test.go src/executor/union_executor_test.go src/executor/engine/join_engine_test.go src/executor/engine/merge_engine_test.go src/executor/engine/union_engine_test.go src/executor/engine/operator/aggregate_operator_test.go src/executor/engine/operator/limit_operator_test.go src/executor/engine/operator/orderby_operator_test.go [patch codecov] src/executor/select_executor.go 100% src/executor/union_executor.go 100% src/executor/engine/common.go 81.8% src/executor/engine/join_engine.go 92.1% src/executor/engine/merge_engine.go 92.5% src/executor/engine/merge_join.go 97.2% src/executor/engine/plan_engine.go 100% src/executor/engine/union_engine.go 85.7% src/executor/engine/operator/aggregate_operator.go 98.1% src/executor/engine/operator/limit_operator.go 100% src/executor/engine/operator/operator.go 78.6% src/executor/engine/operator/orderby_operator.go 83.3%
[summary] `executor` code has poor readability currently, we need refactoring the code. [test case] src/executor/executor_test.go src/executor/select_executor_test.go src/executor/union_executor_test.go src/executor/engine/join_engine_test.go src/executor/engine/merge_engine_test.go src/executor/engine/union_engine_test.go src/executor/engine/operator/aggregate_operator_test.go src/executor/engine/operator/limit_operator_test.go src/executor/engine/operator/orderby_operator_test.go [patch codecov] src/executor/select_executor.go 100% src/executor/union_executor.go 100% src/executor/engine/common.go 81.8% src/executor/engine/join_engine.go 96.0% src/executor/engine/merge_engine.go 97.5% src/executor/engine/merge_join.go 98.6% src/executor/engine/plan_engine.go 100% src/executor/engine/union_engine.go 95.2% src/executor/engine/operator/aggregate_operator.go 98.1% src/executor/engine/operator/limit_operator.go 100% src/executor/engine/operator/operator.go 85.7% src/executor/engine/operator/orderby_operator.go 95.8%
[summary] `executor` code has poor readability currently, we need refactoring the code. [test case] src/executor/executor_test.go src/executor/select_executor_test.go src/executor/union_executor_test.go src/executor/engine/join_engine_test.go src/executor/engine/merge_engine_test.go src/executor/engine/union_engine_test.go src/executor/engine/operator/aggregate_operator_test.go src/executor/engine/operator/limit_operator_test.go src/executor/engine/operator/orderby_operator_test.go [patch codecov] src/executor/select_executor.go 100% src/executor/union_executor.go 100% src/executor/engine/common.go 81.8% src/executor/engine/join_engine.go 96.0% src/executor/engine/merge_engine.go 97.5% src/executor/engine/merge_join.go 98.6% src/executor/engine/plan_engine.go 100% src/executor/engine/union_engine.go 95.2% src/executor/engine/operator/aggregate_operator.go 98.1% src/executor/engine/operator/limit_operator.go 100% src/executor/engine/operator/operator.go 85.7% src/executor/engine/operator/orderby_operator.go 95.8%
[summary] rename some objects.
[summary] Using CastToBool instead of judging value directly will make the result more accurate. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/depends/sqltypes/arithmetic_test.go [patch codecov] 96.9%
[summary] Using CastToBool instead of judging value directly will make the result more accurate. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/depends/sqltypes/arithmetic_test.go [patch codecov] 94.2%
[summary] Using CastToBool instead of judging value directly will make the result more accurate. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/depends/sqltypes/arithmetic_test.go [patch codecov] 94.2%
[summary] Using CastToBool instead of judging value directly will make the result more accurate. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/depends/sqltypes/arithmetic_test.go [patch codecov] 94.2%
[summary] Using CastToBool instead of judging value directly will make the result more accurate. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/depends/sqltypes/arithmetic_test.go [patch codecov] 94.2%
[summary] rename some objects.
[summary] merge the filterTuple and joinTuple. [test case] src/planner/from_test.go src/planner/select_plan_test.go [patch codecov] 96.9%
[summary] merge the filterTuple and joinTuple. [test case] src/planner/from_test.go src/planner/select_plan_test.go [patch codecov] 96.9%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] `planner` code has poor readability currently, we need refactoring the code. [test case] src/planner/builder/aggregate_plan_test.go src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/builder/from_test.go src/planner/builder/limit_plan_test.go src/planner/builder/orderby_plan_test.go src/planner/builder/sqlparser_test.go src/planner/others_plan_test.go src/planner/planner_test.go src/planner/select_plan_test.go src/planner/union_plan_test.go [patch codecov] src/planner/builder 97.7% src/planner 95.8%
[summary] src/executor/engine/join_engine_test.go src/planner/builder/builder_test.go src/planner/builder/from_test.go src/planner/select_plan_test.go [patch codecov] src/planner/builder 97.8%
[summary] Refactor the joinnode code about tableFilter by using CloneExpr. [test case] src/executor/engine/join_engine_test.go src/planner/builder/builder_test.go src/planner/builder/from_test.go src/planner/select_plan_test.go [patch codecov] src/planner/builder 97.8%
[summary] Colname in having must be included in fields, meed check it in parseHaving. [test case] src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/select_plan_test.go [patch codecov] src/planner/builder 97.8%
[summary] Refactor the joinnode code about tableFilter by using CloneExpr. [test case] src/executor/engine/join_engine_test.go src/planner/builder/builder_test.go src/planner/builder/from_test.go src/planner/select_plan_test.go [patch codecov] src/planner/builder 97.8%
[summary] Colname in having must be included in fields, meed check it in parseHaving. [test case] src/planner/builder/builder_test.go src/planner/builder/expr_test.go src/planner/select_plan_test.go [patch codecov] src/planner/builder 97.8%
[summary] In vitess, the AST visitor has been restructured, these work are worthy of reference. The AST structs and interface implementations live in the ast.go, which is what the visitor generator reads to produce the visitor. The rest of the AST functionality, all methods belonging to structs and not implementing any interfaces, now live in ast_funcs.go. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parse_test.go [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast. 87.4% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_func.go 95.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parser.go 90.9% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.0%
In vitess, the AST visitor has been restructured, these work are worthy of reference. |
[summary] In vitess, the AST visitor has been restructured, these work are worthy of reference. The AST structs and interface implementations live in the ast.go, which is what the visitor generator reads to produce the visitor. The rest of the AST functionality, all methods belonging to structs and not implementing any interfaces, now live in ast_funcs.go. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parse_test.go [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 87.4% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_func.go 95.8% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parser.go 90.9% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.0%
[summary] Package visitorgen is responsible for taking the ast.go of Radon and producing visitor infrastructure for it. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/ast_walker_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/struct_producer_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/transformer_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/visitor_emitter_test.go [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/ast_walker.go 80.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/sast.go 87.5% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/struct_producer.go 94.6% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/transformer.go 97.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/visitor_emitter.go 31.8%
[summary] Rewrite traverses a syntax tree recursively, starting with root, and calling pre and post for each node as described below. Rewrite returns the syntax tree, possibly modified. [test case] N/A [patch codecov] N/A
[summary] Remove old visitor and replace functionality, use rewriter as the new visitor. [test case] N/A [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 96.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_func.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter.go 64.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter_api.go 84.6%
…adondb#480 [summary] Remove old visitor and replace functionality, use rewriter as the new visitor. [test case] N/A [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 96.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_func.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter.go 64.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter_api.go 84.6%
…adondb#480 [summary] Remove old visitor and replace functionality, use rewriter as the new visitor. [test case] N/A [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 96.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_funcs.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter.go 64.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter_api.go 84.6%
https://github.com/radondb/radon/blob/master/src/backend/txn.go#L445
We can use |
[summary] Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. We can use the errgroup to handle error under concurrency. [test case] N/A [patch codecov] N/A
[summary] Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. We can use the errgroup to handle error under concurrency. [test case] N/A [patch codecov] src/backend/txn.go 89.8% src/backend/xa.go 91.1% src/executor/engine/join_engine.go 95.7% src/executor/engine/union_engine.go 93.9%
[summary] Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. We can use the errgroup to handle error under concurrency. [test case] N/A [patch codecov] src/backend/txn.go 89.8% src/backend/xa.go 91.1% src/executor/engine/join_engine.go 95.7% src/executor/engine/union_engine.go 93.9%
[summary] Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. We can use the errgroup to handle error under concurrency. [test case] N/A [patch codecov] src/backend/txn.go 89.8% src/backend/xa.go 91.1% src/executor/engine/join_engine.go 95.7% src/executor/engine/union_engine.go 93.9%
[summary] In vitess, the AST visitor has been restructured, these work are worthy of reference. The AST structs and interface implementations live in the ast.go, which is what the visitor generator reads to produce the visitor. The rest of the AST functionality, all methods belonging to structs and not implementing any interfaces, now live in ast_funcs.go. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parse_test.go [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 87.4% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_func.go 95.8% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/parser.go 90.9% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.0%
[summary] Package visitorgen is responsible for taking the ast.go of Radon and producing visitor infrastructure for it. [test case] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/ast_walker_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/struct_producer_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/transformer_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/visitor_emitter_test.go [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/ast_walker.go 80.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/sast.go 87.5% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/struct_producer.go 94.6% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/transformer.go 97.0% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/visitorgen/visitor_emitter.go 31.8%
[summary] Rewrite traverses a syntax tree recursively, starting with root, and calling pre and post for each node as described below. Rewrite returns the syntax tree, possibly modified. [test case] N/A [patch codecov] N/A
…480 [summary] Remove old visitor and replace functionality, use rewriter as the new visitor. [test case] N/A [patch codecov] src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast.go 96.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_funcs.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter.go 64.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/rewriter_api.go 84.6%
[summary] Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. We can use the errgroup to handle error under concurrency. [test case] N/A [patch codecov] src/backend/txn.go 89.8% src/backend/xa.go 91.1% src/executor/engine/join_engine.go 95.7% src/executor/engine/union_engine.go 93.9%
*: use errgroup to handle error under concurrency #480
[summary] partition_options: \* empty *\ | GLOBAL | SINGLE | DISTRIBUTED BY (backend-name) | PARTITION BY HASH(shard-key) {PARTITIONS num} | PARTITION BY LIST(shard-key)(PARTITION backend VALUES IN (value_list),...) [test case] src/proxy/ddl_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go [patch codecov] src/proxy/ddl.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_funcs.go 95.5% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.3%
[summary] partition_options: \* empty *\ | GLOBAL | SINGLE | DISTRIBUTED BY (backend-name) | PARTITION BY HASH(shard-key) {PARTITIONS num} | PARTITION BY LIST(shard-key)(PARTITION backend VALUES IN (value_list),...) [test case] src/proxy/ddl_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go [patch codecov] src/proxy/ddl.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_funcs.go 95.5% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.3%
[summary] reference: https://dev.mysql.com/doc/refman/5.7/en/create-table.html CREATE TABLE [IF NOT EXISTS] tbl_name (create_definition,...) [table_options] [partition_options] partition_options: \* empty *\ | GLOBAL | SINGLE | DISTRIBUTED BY (backend-name) | PARTITION BY HASH(shard-key) {PARTITIONS num} | PARTITION BY LIST(shard-key)(PARTITION backend VALUES IN (value_list),...) [test case] src/proxy/ddl_test.go src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go [patch codecov] src/proxy/ddl.go 94.7% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ast_funcs.go 95.5% src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/sql.go 92.3%
*: refactor partition definition #480
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
planner
code has poor readability currently, we need refactoring the code.The text was updated successfully, but these errors were encountered: