Skip to content

Commit af24809

Browse files
committed
Move role related plans
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 728f796 commit af24809

File tree

13 files changed

+27
-25
lines changed

13 files changed

+27
-25
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ mod plan_partition;
4949
mod plan_projection;
5050
mod plan_read_datasource;
5151
mod plan_remote;
52-
mod plan_role_create;
53-
mod plan_role_drop;
54-
mod plan_role_grant;
55-
mod plan_role_revoke;
5652
mod plan_select;
5753
mod plan_setting;
5854
mod plan_sink;
@@ -159,10 +155,6 @@ pub use plan_read_datasource::SourceInfo;
159155
pub use plan_remote::RemotePlan;
160156
pub use plan_remote::V1RemotePlan;
161157
pub use plan_remote::V2RemotePlan;
162-
pub use plan_role_create::CreateRolePlan;
163-
pub use plan_role_drop::DropRolePlan;
164-
pub use plan_role_grant::GrantRolePlan;
165-
pub use plan_role_revoke::RevokeRolePlan;
166158
pub use plan_select::SelectPlan;
167159
pub use plan_setting::SettingPlan;
168160
pub use plan_setting::VarValue;

src/query/legacy-planners/src/plan_role_drop.rs renamed to src/query/planner/src/plans/drop_role.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_role_grant.rs renamed to src/query/planner/src/plans/grant_role.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/planner/src/plans/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,21 @@ pub use call::CallPlan;
1818
mod create_database;
1919
pub use create_database::CreateDatabasePlan;
2020

21+
mod create_role;
22+
pub use create_role::CreateRolePlan;
23+
2124
mod drop_database;
2225
pub use drop_database::DropDatabasePlan;
2326

27+
mod drop_role;
28+
pub use drop_role::DropRolePlan;
29+
2430
mod grant_privilege;
2531
pub use grant_privilege::GrantPrivilegePlan;
2632

33+
mod grant_role;
34+
pub use grant_role::GrantRolePlan;
35+
2736
mod kill;
2837
pub use kill::KillPlan;
2938

@@ -37,6 +46,9 @@ pub use rename_database::RenameDatabasePlan;
3746
mod revoke_privilege;
3847
pub use revoke_privilege::RevokePrivilegePlan;
3948

49+
mod revoke_role;
50+
pub use revoke_role::RevokeRolePlan;
51+
4052
mod show_create_database;
4153
pub use show_create_database::ShowCreateDatabasePlan;
4254

src/query/legacy-planners/src/plan_role_revoke.rs renamed to src/query/planner/src/plans/revoke_role.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/service/src/interpreters/interpreter_role_create.rs

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

1717
use common_exception::Result;
18-
use common_legacy_planners::CreateRolePlan;
1918
use common_meta_types::RoleInfo;
19+
use common_planner::plans::CreateRolePlan;
2020
use common_users::UserApiProvider;
2121

2222
use crate::interpreters::Interpreter;

src/query/service/src/interpreters/interpreter_role_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::DropRolePlan;
18+
use common_planner::plans::DropRolePlan;
1919
use common_users::UserApiProvider;
2020

2121
use crate::interpreters::Interpreter;

src/query/service/src/interpreters/interpreter_role_grant.rs

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

1717
use common_exception::Result;
18-
use common_legacy_planners::GrantRolePlan;
1918
use common_meta_types::PrincipalIdentity;
19+
use common_planner::plans::GrantRolePlan;
2020
use common_users::UserApiProvider;
2121

2222
use crate::interpreters::Interpreter;

src/query/service/src/interpreters/interpreter_role_revoke.rs

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

1717
use common_exception::Result;
18-
use common_legacy_planners::RevokeRolePlan;
1918
use common_meta_types::PrincipalIdentity;
19+
use common_planner::plans::RevokeRolePlan;
2020
use common_users::UserApiProvider;
2121

2222
use crate::interpreters::Interpreter;

0 commit comments

Comments
 (0)