Skip to content

Commit 9c5b602

Browse files
authored
Merge pull request #7751 from Xuanwo/move-old-to-planner
refactor: Move plans from old planner to new
2 parents e59bed1 + 82e1d41 commit 9c5b602

File tree

115 files changed

+316
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+316
-821
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/query/catalog/src/table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use common_legacy_planners::Extras;
2929
use common_legacy_planners::Partitions;
3030
use common_legacy_planners::ReadDataSourcePlan;
3131
use common_legacy_planners::Statistics;
32-
use common_legacy_planners::TruncateTablePlan;
3332
use common_meta_app::schema::TableInfo;
3433
use common_meta_types::MetaId;
3534
use common_pipeline_core::Pipeline;
@@ -166,7 +165,8 @@ pub trait Table: Sync + Send {
166165
async fn truncate(
167166
&self,
168167
_ctx: Arc<dyn TableContext>,
169-
_truncate_plan: TruncateTablePlan,
168+
_catalog_name: &str,
169+
_purge: bool,
170170
) -> Result<()> {
171171
Err(ErrorCode::UnImplement(format!(
172172
"truncate for table {} is not implemented",

src/query/legacy-planners/src/lib.rs

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
mod plan_aggregator_final;
1616
mod plan_aggregator_partial;
1717
mod plan_broadcast;
18-
mod plan_call;
19-
mod plan_copy;
20-
mod plan_database_create;
21-
mod plan_database_drop;
22-
mod plan_database_rename;
23-
mod plan_database_show_create;
24-
mod plan_database_undrop;
2518
mod plan_delete;
2619
mod plan_empty;
2720
mod plan_explain;
@@ -40,10 +33,8 @@ mod plan_expression_visitor;
4033
mod plan_filter;
4134
mod plan_having;
4235
mod plan_insert_into;
43-
mod plan_kill;
4436
mod plan_limit;
4537
mod plan_limit_by;
46-
mod plan_list;
4738
mod plan_node;
4839
mod plan_node_builder;
4940
mod plan_node_display;
@@ -55,72 +46,20 @@ mod plan_node_stage_table;
5546
mod plan_node_statistics;
5647
mod plan_node_visitor;
5748
mod plan_partition;
58-
mod plan_privilege_grant;
59-
mod plan_privilege_revoke;
6049
mod plan_projection;
6150
mod plan_read_datasource;
6251
mod plan_remote;
63-
mod plan_role_create;
64-
mod plan_role_drop;
65-
mod plan_role_grant;
66-
mod plan_role_revoke;
6752
mod plan_select;
6853
mod plan_setting;
69-
mod plan_show;
70-
mod plan_show_databases;
71-
mod plan_show_engines;
72-
mod plan_show_functions;
73-
mod plan_show_grants;
74-
mod plan_show_metrics;
75-
mod plan_show_processlist;
76-
mod plan_show_roles;
77-
mod plan_show_settings;
78-
mod plan_show_tables;
79-
mod plan_show_tables_status;
80-
mod plan_show_users;
8154
mod plan_sink;
8255
mod plan_sort;
8356
mod plan_subqueries_set;
84-
mod plan_table_alter_cluster_key;
85-
mod plan_table_describe;
86-
mod plan_table_drop;
87-
mod plan_table_drop_cluster_key;
88-
mod plan_table_exists;
89-
mod plan_table_optimize;
9057
mod plan_table_recluster;
91-
mod plan_table_rename;
92-
mod plan_table_show_create;
93-
mod plan_table_truncate;
94-
mod plan_table_undrop;
95-
mod plan_use_database;
96-
mod plan_user_alter;
97-
mod plan_user_create;
98-
mod plan_user_drop;
99-
mod plan_user_stage_create;
100-
mod plan_user_stage_describe;
101-
mod plan_user_stage_drop;
102-
mod plan_user_stage_remove;
103-
mod plan_user_udf_alter;
104-
mod plan_user_udf_create;
105-
mod plan_user_udf_drop;
106-
mod plan_view_alter;
107-
mod plan_view_create;
108-
mod plan_view_drop;
10958
mod plan_window_func;
11059

11160
pub use plan_aggregator_final::AggregatorFinalPlan;
11261
pub use plan_aggregator_partial::AggregatorPartialPlan;
11362
pub use plan_broadcast::BroadcastPlan;
114-
pub use plan_call::CallPlan;
115-
pub use plan_copy::CopyMode;
116-
pub use plan_copy::CopyPlan;
117-
pub use plan_copy::ValidationMode;
118-
pub use plan_database_create::CreateDatabasePlan;
119-
pub use plan_database_drop::DropDatabasePlan;
120-
pub use plan_database_rename::RenameDatabaseEntity;
121-
pub use plan_database_rename::RenameDatabasePlan;
122-
pub use plan_database_show_create::ShowCreateDatabasePlan;
123-
pub use plan_database_undrop::UndropDatabasePlan;
12463
pub use plan_delete::DeletePlan;
12564
pub use plan_empty::EmptyPlan;
12665
pub use plan_explain::ExplainPlan;
@@ -169,10 +108,8 @@ pub use plan_having::HavingPlan;
169108
pub use plan_insert_into::InsertInputSource;
170109
pub use plan_insert_into::InsertPlan;
171110
pub use plan_insert_into::InsertValueBlock;
172-
pub use plan_kill::KillPlan;
173111
pub use plan_limit::LimitPlan;
174112
pub use plan_limit_by::LimitByPlan;
175-
pub use plan_list::ListPlan;
176113
pub use plan_node::PlanNode;
177114
pub use plan_node_builder::PlanBuilder;
178115
pub use plan_node_extras::Extras;
@@ -188,63 +125,18 @@ pub use plan_node_visitor::PlanVisitor;
188125
pub use plan_partition::PartInfo;
189126
pub use plan_partition::PartInfoPtr;
190127
pub use plan_partition::Partitions;
191-
pub use plan_privilege_grant::GrantPrivilegePlan;
192-
pub use plan_privilege_revoke::RevokePrivilegePlan;
193128
pub use plan_projection::ProjectionPlan;
194129
pub use plan_read_datasource::ReadDataSourcePlan;
195130
pub use plan_read_datasource::SourceInfo;
196131
pub use plan_remote::RemotePlan;
197132
pub use plan_remote::V1RemotePlan;
198133
pub use plan_remote::V2RemotePlan;
199-
pub use plan_role_create::CreateRolePlan;
200-
pub use plan_role_drop::DropRolePlan;
201-
pub use plan_role_grant::GrantRolePlan;
202-
pub use plan_role_revoke::RevokeRolePlan;
203134
pub use plan_select::SelectPlan;
204135
pub use plan_setting::SettingPlan;
205136
pub use plan_setting::VarValue;
206-
pub use plan_show::PlanShowKind;
207-
pub use plan_show::ShowPlan;
208-
pub use plan_show_databases::ShowDatabasesPlan;
209-
pub use plan_show_engines::ShowEnginesPlan;
210-
pub use plan_show_functions::ShowFunctionsPlan;
211-
pub use plan_show_grants::ShowGrantsPlan;
212-
pub use plan_show_metrics::ShowMetricsPlan;
213-
pub use plan_show_processlist::ShowProcessListsPlan;
214-
pub use plan_show_roles::ShowRolesPlan;
215-
pub use plan_show_settings::ShowSettingsPlan;
216-
pub use plan_show_tables::ShowTablesPlan;
217-
pub use plan_show_tables_status::ShowTablesStatusPlan;
218-
pub use plan_show_users::ShowUsersPlan;
219137
pub use plan_sink::SinkPlan;
220138
pub use plan_sink::SINK_SCHEMA;
221139
pub use plan_sort::SortPlan;
222140
pub use plan_subqueries_set::SubQueriesSetPlan;
223-
pub use plan_table_alter_cluster_key::AlterTableClusterKeyPlan;
224-
pub use plan_table_describe::DescribeTablePlan;
225-
pub use plan_table_drop::DropTablePlan;
226-
pub use plan_table_drop_cluster_key::DropTableClusterKeyPlan;
227-
pub use plan_table_exists::ExistsTablePlan;
228-
pub use plan_table_optimize::OptimizeTableAction;
229-
pub use plan_table_optimize::OptimizeTablePlan;
230141
pub use plan_table_recluster::ReclusterTablePlan;
231-
pub use plan_table_rename::RenameTableEntity;
232-
pub use plan_table_rename::RenameTablePlan;
233-
pub use plan_table_show_create::ShowCreateTablePlan;
234-
pub use plan_table_truncate::TruncateTablePlan;
235-
pub use plan_table_undrop::UndropTablePlan;
236-
pub use plan_use_database::UseDatabasePlan;
237-
pub use plan_user_alter::AlterUserPlan;
238-
pub use plan_user_create::CreateUserPlan;
239-
pub use plan_user_drop::DropUserPlan;
240-
pub use plan_user_stage_create::CreateUserStagePlan;
241-
pub use plan_user_stage_describe::DescribeUserStagePlan;
242-
pub use plan_user_stage_drop::DropUserStagePlan;
243-
pub use plan_user_stage_remove::RemoveUserStagePlan;
244-
pub use plan_user_udf_alter::AlterUserUDFPlan;
245-
pub use plan_user_udf_create::CreateUserUDFPlan;
246-
pub use plan_user_udf_drop::DropUserUDFPlan;
247-
pub use plan_view_alter::AlterViewPlan;
248-
pub use plan_view_create::CreateViewPlan;
249-
pub use plan_view_drop::DropViewPlan;
250142
pub use plan_window_func::WindowFuncPlan;

src/query/legacy-planners/src/plan_copy.rs

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/query/legacy-planners/src/plan_show.rs

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)