Skip to content

Commit 24ab8c2

Browse files
committed
Add DeletePlanV2
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent f9f483d commit 24ab8c2

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
use std::collections::BTreeMap;
16+
use std::sync::Arc;
17+
18+
use common_datavalues::DataSchema;
19+
use common_datavalues::DataSchemaRef;
20+
use common_legacy_planners::Projection;
21+
use common_meta_types::MetaId;
22+
23+
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq)]
24+
pub struct DeletePlanV2 {
25+
pub catalog_name: String,
26+
pub database_name: String,
27+
pub table_name: String,
28+
pub table_id: MetaId,
29+
pub selection: Option<String>,
30+
pub projection: Projection,
31+
}
32+
33+
impl DeletePlanV2 {
34+
pub fn schema(&self) -> DataSchemaRef {
35+
Arc::new(DataSchema::empty())
36+
}
37+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
mod aggregate;
1616
mod copy_v2;
1717
pub mod create_table_v2;
18+
mod delete_v2;
1819
mod dummy_table_scan;
1920
mod eval_scalar;
2021
mod exchange;

0 commit comments

Comments
 (0)