Skip to content

Commit bcd92f3

Browse files
committed
Migrate user related plan
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent e0b3e40 commit bcd92f3

File tree

11 files changed

+18
-20
lines changed

11 files changed

+18
-20
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ mod plan_sink;
5555
mod plan_sort;
5656
mod plan_subqueries_set;
5757
mod plan_table_recluster;
58-
mod plan_user_alter;
59-
mod plan_user_create;
60-
mod plan_user_drop;
6158
mod plan_user_stage_create;
6259
mod plan_user_stage_describe;
6360
mod plan_user_stage_drop;
@@ -152,9 +149,6 @@ pub use plan_sink::SINK_SCHEMA;
152149
pub use plan_sort::SortPlan;
153150
pub use plan_subqueries_set::SubQueriesSetPlan;
154151
pub use plan_table_recluster::ReclusterTablePlan;
155-
pub use plan_user_alter::AlterUserPlan;
156-
pub use plan_user_create::CreateUserPlan;
157-
pub use plan_user_drop::DropUserPlan;
158152
pub use plan_user_stage_create::CreateUserStagePlan;
159153
pub use plan_user_stage_describe::DescribeUserStagePlan;
160154
pub use plan_user_stage_drop::DropUserStagePlan;

src/query/legacy-planners/src/plan_user_alter.rs renamed to src/query/planner/src/plans/alter_user.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Datafuse Labs.
1+
// Copyright 2022 Datafuse Labs.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
1514
use std::sync::Arc;
1615

1716
use common_datavalues::DataSchema;

src/query/legacy-planners/src/plan_user_create.rs renamed to src/query/planner/src/plans/create_user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Datafuse Labs.
1+
// Copyright 2022 Datafuse Labs.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

src/query/legacy-planners/src/plan_user_drop.rs renamed to src/query/planner/src/plans/drop_user.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Datafuse Labs.
1+
// Copyright 2022 Datafuse Labs.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
1514
use std::sync::Arc;
1615

1716
use common_datavalues::DataSchema;

src/query/planner/src/plans/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
// limitations under the License.
1414

1515
mod alter_table_cluster_key;
16+
mod alter_user;
1617
mod call;
1718
mod create_database;
1819
mod create_role;
20+
mod create_user;
1921
mod describe_table;
2022
mod drop_database;
2123
mod drop_role;
2224
mod drop_table;
2325
mod drop_table_cluster_key;
26+
mod drop_user;
2427
mod exists_table;
2528
mod grant_privilege;
2629
mod grant_role;
@@ -40,14 +43,17 @@ mod undrop_table;
4043
mod use_database;
4144

4245
pub use alter_table_cluster_key::AlterTableClusterKeyPlan;
46+
pub use alter_user::AlterUserPlan;
4347
pub use call::CallPlan;
4448
pub use create_database::CreateDatabasePlan;
4549
pub use create_role::CreateRolePlan;
50+
pub use create_user::CreateUserPlan;
4651
pub use describe_table::DescribeTablePlan;
4752
pub use drop_database::DropDatabasePlan;
4853
pub use drop_role::DropRolePlan;
4954
pub use drop_table::DropTablePlan;
5055
pub use drop_table_cluster_key::DropTableClusterKeyPlan;
56+
pub use drop_user::DropUserPlan;
5157
pub use exists_table::ExistsTablePlan;
5258
pub use grant_privilege::GrantPrivilegePlan;
5359
pub use grant_role::GrantRolePlan;

src/query/service/src/interpreters/interpreter_user_alter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use std::sync::Arc;
1616

1717
use common_exception::Result;
18-
use common_legacy_planners::AlterUserPlan;
18+
use common_planner::plans::AlterUserPlan;
1919
use common_users::UserApiProvider;
2020

2121
use crate::interpreters::Interpreter;

src/query/service/src/interpreters/interpreter_user_create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
use std::sync::Arc;
1616

1717
use common_exception::Result;
18-
use common_legacy_planners::CreateUserPlan;
1918
use common_meta_types::UserGrantSet;
2019
use common_meta_types::UserInfo;
2120
use common_meta_types::UserQuota;
21+
use common_planner::plans::CreateUserPlan;
2222
use common_users::UserApiProvider;
2323

2424
use crate::interpreters::Interpreter;

src/query/service/src/interpreters/interpreter_user_drop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use std::sync::Arc;
1616

1717
use common_exception::Result;
18-
use common_legacy_planners::DropUserPlan;
18+
use common_planner::plans::DropUserPlan;
1919
use common_users::UserApiProvider;
2020

2121
use crate::interpreters::Interpreter;

src/query/service/src/sql/planner/binder/ddl/account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ use common_ast::ast::CreateUserStmt;
1919
use common_ast::ast::GrantStmt;
2020
use common_ast::ast::RevokeStmt;
2121
use common_exception::Result;
22-
use common_legacy_planners::AlterUserPlan;
23-
use common_legacy_planners::CreateUserPlan;
2422
use common_meta_types::AuthInfo;
2523
use common_meta_types::GrantObject;
2624
use common_meta_types::UserOption;
2725
use common_meta_types::UserPrivilegeSet;
26+
use common_planner::plans::AlterUserPlan;
27+
use common_planner::plans::CreateUserPlan;
2828
use common_planner::plans::GrantPrivilegePlan;
2929
use common_planner::plans::GrantRolePlan;
3030
use common_planner::plans::RevokePrivilegePlan;

src/query/service/src/sql/planner/binder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ use common_datavalues::DataTypeImpl;
2727
use common_exception::Result;
2828
use common_legacy_planners::AlterUserUDFPlan;
2929
use common_legacy_planners::CreateUserUDFPlan;
30-
use common_legacy_planners::DropUserPlan;
3130
use common_legacy_planners::DropUserStagePlan;
3231
use common_legacy_planners::DropUserUDFPlan;
3332
use common_meta_types::UserDefinedFunction;
3433
use common_planner::plans::CallPlan;
3534
use common_planner::plans::CreateRolePlan;
3635
use common_planner::plans::DropRolePlan;
36+
use common_planner::plans::DropUserPlan;
3737
use common_planner::plans::ShowGrantsPlan;
3838
use common_planner::plans::UseDatabasePlan;
3939
use common_planner::MetadataRef;

0 commit comments

Comments
 (0)