Skip to content

Commit 5a7f61b

Browse files
committed
Move Privilege
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent ec2f438 commit 5a7f61b

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ mod plan_node_stage_table;
4646
mod plan_node_statistics;
4747
mod plan_node_visitor;
4848
mod plan_partition;
49-
mod plan_privilege_grant;
50-
mod plan_privilege_revoke;
5149
mod plan_projection;
5250
mod plan_read_datasource;
5351
mod plan_remote;
@@ -167,8 +165,6 @@ pub use plan_node_visitor::PlanVisitor;
167165
pub use plan_partition::PartInfo;
168166
pub use plan_partition::PartInfoPtr;
169167
pub use plan_partition::Partitions;
170-
pub use plan_privilege_grant::GrantPrivilegePlan;
171-
pub use plan_privilege_revoke::RevokePrivilegePlan;
172168
pub use plan_projection::ProjectionPlan;
173169
pub use plan_read_datasource::ReadDataSourcePlan;
174170
pub use plan_read_datasource::SourceInfo;

src/query/legacy-planners/src/plan_privilege_grant.rs renamed to src/query/planner/src/plans/grant_privilege.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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pub use create_database::CreateDatabasePlan;
2121
mod drop_database;
2222
pub use drop_database::DropDatabasePlan;
2323

24+
mod grant_privilege;
25+
pub use grant_privilege::GrantPrivilegePlan;
26+
2427
mod kill;
2528
pub use kill::KillPlan;
2629

@@ -31,6 +34,9 @@ mod rename_database;
3134
pub use rename_database::RenameDatabaseEntity;
3235
pub use rename_database::RenameDatabasePlan;
3336

37+
mod revoke_privilege;
38+
pub use revoke_privilege::RevokePrivilegePlan;
39+
3440
mod show_create_database;
3541
pub use show_create_database::ShowCreateDatabasePlan;
3642

src/query/legacy-planners/src/plan_privilege_revoke.rs renamed to src/query/planner/src/plans/revoke_privilege.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_privilege_grant.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::GrantPrivilegePlan;
1918
use common_meta_types::GrantObject;
2019
use common_meta_types::PrincipalIdentity;
2120
use common_meta_types::UserPrivilegeSet;
21+
use common_planner::plans::GrantPrivilegePlan;
2222
use common_users::UserApiProvider;
2323

2424
use crate::interpreters::interpreter_common::validate_grant_object_exists;

src/query/service/src/interpreters/interpreter_privilege_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::RevokePrivilegePlan;
1918
use common_meta_types::PrincipalIdentity;
19+
use common_planner::plans::RevokePrivilegePlan;
2020
use common_users::UserApiProvider;
2121

2222
use crate::interpreters::interpreter_common::validate_grant_object_exists;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ use common_ast::ast::RevokeStmt;
2121
use common_exception::Result;
2222
use common_legacy_planners::AlterUserPlan;
2323
use common_legacy_planners::CreateUserPlan;
24-
use common_legacy_planners::GrantPrivilegePlan;
2524
use common_legacy_planners::GrantRolePlan;
26-
use common_legacy_planners::RevokePrivilegePlan;
2725
use common_legacy_planners::RevokeRolePlan;
2826
use common_meta_types::AuthInfo;
2927
use common_meta_types::GrantObject;
3028
use common_meta_types::UserOption;
3129
use common_meta_types::UserPrivilegeSet;
30+
use common_planner::plans::GrantPrivilegePlan;
31+
use common_planner::plans::RevokePrivilegePlan;
3232
use common_users::UserApiProvider;
3333

3434
use crate::sql::plans::Plan;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ use common_legacy_planners::DropUserStagePlan;
6363
use common_legacy_planners::DropUserUDFPlan;
6464
use common_legacy_planners::DropViewPlan;
6565
use common_legacy_planners::ExistsTablePlan;
66-
use common_legacy_planners::GrantPrivilegePlan;
6766
use common_legacy_planners::GrantRolePlan;
6867
use common_legacy_planners::OptimizeTablePlan;
6968
use common_legacy_planners::ReclusterTablePlan;
7069
use common_legacy_planners::RemoveUserStagePlan;
7170
use common_legacy_planners::RenameTablePlan;
72-
use common_legacy_planners::RevokePrivilegePlan;
7371
use common_legacy_planners::RevokeRolePlan;
7472
use common_legacy_planners::SettingPlan;
7573
use common_legacy_planners::ShowCreateTablePlan;
@@ -80,9 +78,11 @@ use common_legacy_planners::UseDatabasePlan;
8078
use common_planner::plans::CallPlan;
8179
use common_planner::plans::CreateDatabasePlan;
8280
use common_planner::plans::DropDatabasePlan;
81+
use common_planner::plans::GrantPrivilegePlan;
8382
use common_planner::plans::KillPlan;
8483
use common_planner::plans::ListPlan;
8584
use common_planner::plans::RenameDatabasePlan;
85+
use common_planner::plans::RevokePrivilegePlan;
8686
use common_planner::plans::ShowCreateDatabasePlan;
8787
use common_planner::plans::UndropDatabasePlan;
8888
use common_planner::MetadataRef;

0 commit comments

Comments
 (0)