Skip to content

Commit 013d2a5

Browse files
committed
Move CreateDatabase
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent ee54c82 commit 013d2a5

File tree

9 files changed

+10
-7
lines changed

9 files changed

+10
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 0 additions & 2 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_create;
1918
mod plan_database_drop;
2019
mod plan_database_rename;
2120
mod plan_database_show_create;
@@ -109,7 +108,6 @@ mod plan_window_func;
109108
pub use plan_aggregator_final::AggregatorFinalPlan;
110109
pub use plan_aggregator_partial::AggregatorPartialPlan;
111110
pub use plan_broadcast::BroadcastPlan;
112-
pub use plan_database_create::CreateDatabasePlan;
113111
pub use plan_database_drop::DropDatabasePlan;
114112
pub use plan_database_rename::RenameDatabaseEntity;
115113
pub use plan_database_rename::RenameDatabasePlan;

src/query/planner/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ edition = "2021"
99
[dependencies]
1010
common-catalog = { path = "../catalog" }
1111
common-datavalues = { path = "../datavalues" }
12+
common-meta-app = {path = "../../meta/app"}
1213

1314
parking_lot = "0.12"
1415
serde = { version = "1", features = ["derive"]}

src/query/legacy-planners/src/plan_database_create.rs renamed to src/query/planner/src/plans/create_database.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414

1515
mod call;
1616
pub use call::CallPlan;
17+
18+
mod create_database;
19+
pub use create_database::CreateDatabasePlan;

src/query/service/src/interpreters/interpreter_database_create.rs

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

1717
use common_exception::ErrorCode;
1818
use common_exception::Result;
19-
use common_legacy_planners::CreateDatabasePlan;
19+
use common_planner::plans::CreateDatabasePlan;
2020
use common_users::UserApiProvider;
2121

2222
use crate::interpreters::Interpreter;

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

Lines changed: 1 addition & 1 deletion
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::CreateDatabasePlan;
3433
use common_legacy_planners::DropDatabasePlan;
3534
use common_legacy_planners::RenameDatabaseEntity;
3635
use common_legacy_planners::RenameDatabasePlan;
3736
use common_legacy_planners::ShowCreateDatabasePlan;
3837
use common_legacy_planners::UndropDatabasePlan;
3938
use common_meta_app::schema::DatabaseMeta;
4039
use common_meta_app::share::ShareNameIdent;
40+
use common_planner::plans::CreateDatabasePlan;
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
@@ -48,7 +48,6 @@ use common_legacy_planners::AlterTableClusterKeyPlan;
4848
use common_legacy_planners::AlterUserPlan;
4949
use common_legacy_planners::AlterUserUDFPlan;
5050
use common_legacy_planners::AlterViewPlan;
51-
use common_legacy_planners::CreateDatabasePlan;
5251
use common_legacy_planners::CreateRolePlan;
5352
use common_legacy_planners::CreateUserPlan;
5453
use common_legacy_planners::CreateUserStagePlan;
@@ -85,6 +84,7 @@ use common_legacy_planners::UndropDatabasePlan;
8584
use common_legacy_planners::UndropTablePlan;
8685
use common_legacy_planners::UseDatabasePlan;
8786
use common_planner::plans::CallPlan;
87+
use common_planner::plans::CreateDatabasePlan;
8888
use common_planner::MetadataRef;
8989
pub use copy_v2::CopyPlanV2;
9090
pub use copy_v2::ValidationMode;

src/query/service/tests/it/storages/fuse/table_test_fixture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ use common_datablocks::assert_blocks_sorted_eq_with_name;
2020
use common_datablocks::DataBlock;
2121
use common_datavalues::prelude::*;
2222
use common_exception::Result;
23-
use common_legacy_planners::CreateDatabasePlan;
2423
use common_legacy_planners::Expression;
2524
use common_legacy_planners::Extras;
2625
use common_meta_app::schema::DatabaseMeta;
2726
use common_meta_app::schema::TableMeta;
2827
use common_pipeline_core::processors::port::OutputPort;
2928
use common_pipeline_core::SourcePipeBuilder;
29+
use common_planner::plans::CreateDatabasePlan;
3030
use common_storage::StorageFsConfig;
3131
use common_storage::StorageParams;
3232
use common_streams::SendableDataBlockStream;

0 commit comments

Comments
 (0)