Split AstToExecutor from dbgFuncCoprocessor.#4610
Split AstToExecutor from dbgFuncCoprocessor.#4610ti-chi-bot merged 11 commits intopingcap:masterfrom
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
@ywqzzy: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
dbms/src/Debug/AstToExecutor.cpp
Outdated
| } | ||
| else if (ASTFunction * func = typeid_cast<ASTFunction *>(ast.get())) | ||
| { | ||
| /// aggregation function is handled in Aggregation, so just treated as a column |
There was a problem hiding this comment.
how about move this branch into another function?
There was a problem hiding this comment.
how about move this branch into another function?
Good idea. I will refactor them all.
| } | ||
| else if (ASTFunction * func = typeid_cast<ASTFunction *>(ast.get())) | ||
| { | ||
| /// check function |
dbms/src/Debug/AstToExecutor.cpp
Outdated
| } | ||
| } // namespace | ||
|
|
||
| String LOCAL_HOST = "127.0.0.1:3930"; |
There was a problem hiding this comment.
move to anonymous namespace?
There was a problem hiding this comment.
done. I have moved it into namespace db::debug.
| } | ||
| virtual bool toTiPBExecutor(tipb::Executor * tipb_executor, uint32_t collator_id, const MPPInfo & mpp_info, const Context & context) | ||
| = 0; | ||
| virtual void toMPPSubPlan(size_t & executor_index, const DAGProperties & properties, std::unordered_map<String, std::pair<std::shared_ptr<ExchangeReceiver>, std::shared_ptr<ExchangeSender>>> & exchange_map) |
There was a problem hiding this comment.
is executor_index expected to be mutable to derived classes of Executor?
| tipb::ExchangeType type; | ||
| TaskMetas task_metas; | ||
| std::vector<size_t> partition_keys; | ||
| ExchangeSender(size_t & index, const DAGSchema & output, tipb::ExchangeType type_, const std::vector<size_t> & partition_keys_ = {}) |
| struct ExchangeReceiver : Executor | ||
| { | ||
| TaskMetas task_metas; | ||
| ExchangeReceiver(size_t & index, const DAGSchema & output) |
dbms/src/Debug/AstToExecutor.h
Outdated
| { | ||
| TableInfo table_info; | ||
| /// used by column pruner | ||
| TableScan(size_t & index_, const DAGSchema & output_schema_, TableInfo & table_info_) |
There was a problem hiding this comment.
ditto, the same as table_info_.
dbms/src/Debug/AstToExecutor.h
Outdated
| struct Selection : public Executor | ||
| { | ||
| std::vector<ASTPtr> conditions; | ||
| Selection(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> && conditions_) |
There was a problem hiding this comment.
| Selection(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> && conditions_) | |
| Selection(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> conditions_) |
dbms/src/Debug/AstToExecutor.h
Outdated
| { | ||
| std::vector<ASTPtr> order_columns; | ||
| size_t limit; | ||
| TopN(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> && order_columns_, size_t limit_) |
There was a problem hiding this comment.
| TopN(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> && order_columns_, size_t limit_) | |
| TopN(size_t & index_, const DAGSchema & output_schema_, std::vector<ASTPtr> order_columns_, size_t limit_) |
fbb50e5 to
0704608
Compare
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
|
/run-integration-test |
|
/cc @yibin87 |
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
dbms/src/Debug/astToExecutor.cpp
Outdated
| {"group_concat", tipb::ExprType::GroupConcat}, | ||
| }); | ||
|
|
||
| DAGColumnInfo toNullableDAGColumnInfo(DAGColumnInfo & input) |
There was a problem hiding this comment.
Make the parameter const?
4035bb4 to
f8a5692
Compare
|
/merge |
|
@ywqzzy: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: f8a5692 |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4609
Problem Summary:
Need to provide Ast to tipb::Executor helper functions for Interpreter test framework, but all of them are in .cpp file.
What is changed and how it works?
Move Ast to tipb::Executor helper functions to astToExecutor.h
Check List
Tests
Side effects
Documentation
Release note