Skip to content

Commit 728f796

Browse files
committed
Move ShowGrants
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 1d7a64d commit 728f796

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ mod plan_role_grant;
5555
mod plan_role_revoke;
5656
mod plan_select;
5757
mod plan_setting;
58-
mod plan_show_grants;
5958
mod plan_sink;
6059
mod plan_sort;
6160
mod plan_subqueries_set;
@@ -167,7 +166,6 @@ pub use plan_role_revoke::RevokeRolePlan;
167166
pub use plan_select::SelectPlan;
168167
pub use plan_setting::SettingPlan;
169168
pub use plan_setting::VarValue;
170-
pub use plan_show_grants::ShowGrantsPlan;
171169
pub use plan_sink::SinkPlan;
172170
pub use plan_sink::SINK_SCHEMA;
173171
pub use plan_sort::SortPlan;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ pub use revoke_privilege::RevokePrivilegePlan;
4040
mod show_create_database;
4141
pub use show_create_database::ShowCreateDatabasePlan;
4242

43+
mod show_grants;
44+
pub use show_grants::ShowGrantsPlan;
45+
4346
mod undrop_database;
4447
pub use undrop_database::UndropDatabasePlan;

src/query/legacy-planners/src/plan_show_grants.rs renamed to src/query/planner/src/plans/show_grants.rs

Lines changed: 2 additions & 7 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,12 +11,7 @@
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-
15-
use common_datavalues::DataField;
16-
use common_datavalues::DataSchemaRef;
17-
use common_datavalues::DataSchemaRefExt;
18-
use common_datavalues::ToDataType;
19-
use common_datavalues::Vu8;
14+
use common_datavalues::prelude::*;
2015
use common_meta_types::PrincipalIdentity;
2116

2217
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Eq)]

src/query/service/src/interpreters/interpreter_show_grants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use std::sync::Arc;
1717
use common_datablocks::DataBlock;
1818
use common_datavalues::prelude::*;
1919
use common_exception::Result;
20-
use common_legacy_planners::ShowGrantsPlan;
2120
use common_meta_types::PrincipalIdentity;
21+
use common_planner::plans::ShowGrantsPlan;
2222
use common_users::RoleCacheManager;
2323
use common_users::UserApiProvider;
2424

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ use common_legacy_planners::DropRolePlan;
3232
use common_legacy_planners::DropUserPlan;
3333
use common_legacy_planners::DropUserStagePlan;
3434
use common_legacy_planners::DropUserUDFPlan;
35-
use common_legacy_planners::ShowGrantsPlan;
3635
use common_legacy_planners::UseDatabasePlan;
3736
use common_meta_types::UserDefinedFunction;
3837
use common_planner::plans::CallPlan;
38+
use common_planner::plans::ShowGrantsPlan;
3939
use common_planner::MetadataRef;
4040
pub use scalar::ScalarBinder;
4141
pub use scalar_common::*;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ use common_legacy_planners::RenameTablePlan;
7171
use common_legacy_planners::RevokeRolePlan;
7272
use common_legacy_planners::SettingPlan;
7373
use common_legacy_planners::ShowCreateTablePlan;
74-
use common_legacy_planners::ShowGrantsPlan;
7574
use common_legacy_planners::TruncateTablePlan;
7675
use common_legacy_planners::UndropTablePlan;
7776
use common_legacy_planners::UseDatabasePlan;
@@ -84,6 +83,7 @@ use common_planner::plans::ListPlan;
8483
use common_planner::plans::RenameDatabasePlan;
8584
use common_planner::plans::RevokePrivilegePlan;
8685
use common_planner::plans::ShowCreateDatabasePlan;
86+
use common_planner::plans::ShowGrantsPlan;
8787
use common_planner::plans::UndropDatabasePlan;
8888
use common_planner::MetadataRef;
8989
pub use copy_v2::CopyPlanV2;

0 commit comments

Comments
 (0)