Skip to content

Commit 20698b5

Browse files
committed
Move CallPlan
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 7ef94fd commit 20698b5

File tree

9 files changed

+25
-7
lines changed

9 files changed

+25
-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_call;
1918
mod plan_copy;
2019
mod plan_database_create;
2120
mod plan_database_drop;
@@ -111,7 +110,6 @@ mod plan_window_func;
111110
pub use plan_aggregator_final::AggregatorFinalPlan;
112111
pub use plan_aggregator_partial::AggregatorPartialPlan;
113112
pub use plan_broadcast::BroadcastPlan;
114-
pub use plan_call::CallPlan;
115113
pub use plan_copy::CopyMode;
116114
pub use plan_copy::CopyPlan;
117115
pub use plan_copy::ValidationMode;

src/query/planner/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ common-catalog = { path = "../catalog" }
1111
common-datavalues = { path = "../datavalues" }
1212

1313
parking_lot = "0.12"
14+
serde = { version = "1", features = ["derive"]}

src/query/planner/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ pub use metadata::Metadata;
2929
pub use metadata::MetadataRef;
3030
pub use metadata::TableEntry;
3131
pub use metadata::DUMMY_TABLE_INDEX;
32+
33+
// Plan will be used publicly.
34+
pub mod plans;

src/query/legacy-planners/src/plan_call.rs renamed to src/query/planner/src/plans/call.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/planner/src/plans/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2022 Datafuse Labs.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
mod call;
16+
pub use call::CallPlan;

src/query/service/src/interpreters/interpreter_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::sync::RwLock;
1717

1818
use common_datavalues::DataSchemaRef;
1919
use common_exception::Result;
20-
use common_legacy_planners::CallPlan;
20+
use common_planner::plans::CallPlan;
2121

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use common_ast::UDFValidator;
2626
use common_datavalues::DataTypeImpl;
2727
use common_exception::Result;
2828
use common_legacy_planners::AlterUserUDFPlan;
29-
use common_legacy_planners::CallPlan;
3029
use common_legacy_planners::CreateRolePlan;
3130
use common_legacy_planners::CreateUserUDFPlan;
3231
use common_legacy_planners::DropRolePlan;
@@ -36,6 +35,7 @@ use common_legacy_planners::DropUserUDFPlan;
3635
use common_legacy_planners::ShowGrantsPlan;
3736
use common_legacy_planners::UseDatabasePlan;
3837
use common_meta_types::UserDefinedFunction;
38+
use common_planner::plans::CallPlan;
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
@@ -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::CallPlan;
5251
use common_legacy_planners::CreateDatabasePlan;
5352
use common_legacy_planners::CreateRolePlan;
5453
use common_legacy_planners::CreateUserPlan;
@@ -85,6 +84,7 @@ use common_legacy_planners::TruncateTablePlan;
8584
use common_legacy_planners::UndropDatabasePlan;
8685
use common_legacy_planners::UndropTablePlan;
8786
use common_legacy_planners::UseDatabasePlan;
87+
use common_planner::plans::CallPlan;
8888
use common_planner::MetadataRef;
8989
pub use copy_v2::CopyPlanV2;
9090
pub use copy_v2::ValidationMode;

0 commit comments

Comments
 (0)