Skip to content

Commit f2dd9d7

Browse files
committed
Move RenameDatabase
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 5bdf015 commit f2dd9d7

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
mod plan_aggregator_final;
1616
mod plan_aggregator_partial;
1717
mod plan_broadcast;
18-
mod plan_database_rename;
1918
mod plan_database_show_create;
2019
mod plan_database_undrop;
2120
mod plan_delete;
@@ -107,8 +106,6 @@ mod plan_window_func;
107106
pub use plan_aggregator_final::AggregatorFinalPlan;
108107
pub use plan_aggregator_partial::AggregatorPartialPlan;
109108
pub use plan_broadcast::BroadcastPlan;
110-
pub use plan_database_rename::RenameDatabaseEntity;
111-
pub use plan_database_rename::RenameDatabasePlan;
112109
pub use plan_database_show_create::ShowCreateDatabasePlan;
113110
pub use plan_database_undrop::UndropDatabasePlan;
114111
pub use plan_delete::DeletePlan;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ pub use create_database::CreateDatabasePlan;
2020

2121
mod drop_database;
2222
pub use drop_database::DropDatabasePlan;
23+
24+
mod rename_database;
25+
pub use rename_database::RenameDatabaseEntity;
26+
pub use rename_database::RenameDatabasePlan;

src/query/legacy-planners/src/plan_database_rename.rs renamed to src/query/planner/src/plans/rename_database.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_database_rename.rs

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

1717
use common_exception::Result;
18-
use common_legacy_planners::RenameDatabasePlan;
1918
use common_meta_app::schema::DatabaseNameIdent;
2019
use common_meta_app::schema::RenameDatabaseReq;
20+
use common_planner::plans::RenameDatabasePlan;
2121

2222
use crate::interpreters::Interpreter;
2323
use crate::pipelines::PipelineBuildResult;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ use common_datavalues::DataSchemaRefExt;
3030
use common_datavalues::ToDataType;
3131
use common_datavalues::Vu8;
3232
use common_exception::Result;
33-
use common_legacy_planners::RenameDatabaseEntity;
34-
use common_legacy_planners::RenameDatabasePlan;
3533
use common_legacy_planners::ShowCreateDatabasePlan;
3634
use common_legacy_planners::UndropDatabasePlan;
3735
use common_meta_app::schema::DatabaseMeta;
3836
use common_meta_app::share::ShareNameIdent;
3937
use common_planner::plans::CreateDatabasePlan;
4038
use common_planner::plans::DropDatabasePlan;
39+
use common_planner::plans::RenameDatabaseEntity;
40+
use common_planner::plans::RenameDatabasePlan;
4141

4242
use crate::sql::binder::Binder;
4343
use crate::sql::planner::semantic::normalize_identifier;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ use common_legacy_planners::ListPlan;
7070
use common_legacy_planners::OptimizeTablePlan;
7171
use common_legacy_planners::ReclusterTablePlan;
7272
use common_legacy_planners::RemoveUserStagePlan;
73-
use common_legacy_planners::RenameDatabasePlan;
7473
use common_legacy_planners::RenameTablePlan;
7574
use common_legacy_planners::RevokePrivilegePlan;
7675
use common_legacy_planners::RevokeRolePlan;
@@ -85,6 +84,7 @@ use common_legacy_planners::UseDatabasePlan;
8584
use common_planner::plans::CallPlan;
8685
use common_planner::plans::CreateDatabasePlan;
8786
use common_planner::plans::DropDatabasePlan;
87+
use common_planner::plans::RenameDatabasePlan;
8888
use common_planner::MetadataRef;
8989
pub use copy_v2::CopyPlanV2;
9090
pub use copy_v2::ValidationMode;

0 commit comments

Comments
 (0)