Skip to content

Commit d51342b

Browse files
committed
Move view related plans
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent e0796f2 commit d51342b

File tree

10 files changed

+15
-18
lines changed

10 files changed

+15
-18
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ mod plan_sink;
5555
mod plan_sort;
5656
mod plan_subqueries_set;
5757
mod plan_table_recluster;
58-
mod plan_view_alter;
59-
mod plan_view_create;
60-
mod plan_view_drop;
6158
mod plan_window_func;
6259

6360
pub use plan_aggregator_final::AggregatorFinalPlan;
@@ -142,7 +139,4 @@ pub use plan_sink::SINK_SCHEMA;
142139
pub use plan_sort::SortPlan;
143140
pub use plan_subqueries_set::SubQueriesSetPlan;
144141
pub use plan_table_recluster::ReclusterTablePlan;
145-
pub use plan_view_alter::AlterViewPlan;
146-
pub use plan_view_create::CreateViewPlan;
147-
pub use plan_view_drop::DropViewPlan;
148142
pub use plan_window_func::WindowFuncPlan;

src/query/legacy-planners/src/plan_view_alter.rs renamed to src/query/planner/src/plans/alter_view.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/legacy-planners/src/plan_view_create.rs renamed to src/query/planner/src/plans/create_view.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/legacy-planners/src/plan_view_drop.rs renamed to src/query/planner/src/plans/drop_view.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
mod alter_table_cluster_key;
1616
mod alter_udf;
1717
mod alter_user;
18+
mod alter_view;
1819
mod call;
1920
mod create_database;
2021
mod create_role;
2122
mod create_stage;
2223
mod create_udf;
2324
mod create_user;
25+
mod create_view;
2426
mod describe_table;
2527
mod drop_database;
2628
mod drop_role;
@@ -29,6 +31,7 @@ mod drop_table;
2931
mod drop_table_cluster_key;
3032
mod drop_udf;
3133
mod drop_user;
34+
mod drop_view;
3235
mod exists_table;
3336
mod grant_privilege;
3437
mod grant_role;
@@ -51,12 +54,14 @@ mod use_database;
5154
pub use alter_table_cluster_key::AlterTableClusterKeyPlan;
5255
pub use alter_udf::AlterUDFPlan;
5356
pub use alter_user::AlterUserPlan;
57+
pub use alter_view::AlterViewPlan;
5458
pub use call::CallPlan;
5559
pub use create_database::CreateDatabasePlan;
5660
pub use create_role::CreateRolePlan;
5761
pub use create_stage::CreateStagePlan;
5862
pub use create_udf::CreateUDFPlan;
5963
pub use create_user::CreateUserPlan;
64+
pub use create_view::CreateViewPlan;
6065
pub use describe_table::DescribeTablePlan;
6166
pub use drop_database::DropDatabasePlan;
6267
pub use drop_role::DropRolePlan;
@@ -65,6 +70,7 @@ pub use drop_table::DropTablePlan;
6570
pub use drop_table_cluster_key::DropTableClusterKeyPlan;
6671
pub use drop_udf::DropUDFPlan;
6772
pub use drop_user::DropUserPlan;
73+
pub use drop_view::DropViewPlan;
6874
pub use exists_table::ExistsTablePlan;
6975
pub use grant_privilege::GrantPrivilegePlan;
7076
pub use grant_role::GrantRolePlan;

src/query/service/src/interpreters/interpreter_view_alter.rs

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

1818
use common_exception::ErrorCode;
1919
use common_exception::Result;
20-
use common_legacy_planners::AlterViewPlan;
2120
use common_meta_app::schema::CreateTableReq;
2221
use common_meta_app::schema::DropTableReq;
2322
use common_meta_app::schema::TableMeta;
2423
use common_meta_app::schema::TableNameIdent;
24+
use common_planner::plans::AlterViewPlan;
2525

2626
use crate::interpreters::Interpreter;
2727
use crate::pipelines::PipelineBuildResult;

src/query/service/src/interpreters/interpreter_view_create.rs

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

1818
use common_exception::ErrorCode;
1919
use common_exception::Result;
20-
use common_legacy_planners::CreateViewPlan;
2120
use common_meta_app::schema::CreateTableReq;
2221
use common_meta_app::schema::TableMeta;
2322
use common_meta_app::schema::TableNameIdent;
23+
use common_planner::plans::CreateViewPlan;
2424

2525
use crate::interpreters::Interpreter;
2626
use crate::pipelines::PipelineBuildResult;

src/query/service/src/interpreters/interpreter_view_drop.rs

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

1717
use common_exception::ErrorCode;
1818
use common_exception::Result;
19-
use common_legacy_planners::DropViewPlan;
2019
use common_meta_app::schema::DropTableReq;
2120
use common_meta_app::schema::TableNameIdent;
21+
use common_planner::plans::DropViewPlan;
2222

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use common_ast::ast::AlterViewStmt;
1616
use common_ast::ast::CreateViewStmt;
1717
use common_ast::ast::DropViewStmt;
1818
use common_exception::Result;
19-
use common_legacy_planners::AlterViewPlan;
20-
use common_legacy_planners::CreateViewPlan;
21-
use common_legacy_planners::DropViewPlan;
19+
use common_planner::plans::AlterViewPlan;
20+
use common_planner::plans::CreateViewPlan;
21+
use common_planner::plans::DropViewPlan;
2222

2323
use crate::sql::binder::Binder;
2424
use crate::sql::planner::semantic::normalize_identifier;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,20 @@ use common_datavalues::DataSchema;
4444
use common_datavalues::DataSchemaRef;
4545
use common_datavalues::DataSchemaRefExt;
4646
use common_datavalues::StringType;
47-
use common_legacy_planners::AlterViewPlan;
48-
use common_legacy_planners::CreateViewPlan;
4947
use common_legacy_planners::DeletePlan;
50-
use common_legacy_planners::DropViewPlan;
5148
use common_legacy_planners::ReclusterTablePlan;
5249
use common_legacy_planners::SettingPlan;
5350
use common_planner::plans::AlterTableClusterKeyPlan;
5451
use common_planner::plans::AlterUDFPlan;
5552
use common_planner::plans::AlterUserPlan;
53+
use common_planner::plans::AlterViewPlan;
5654
use common_planner::plans::CallPlan;
5755
use common_planner::plans::CreateDatabasePlan;
5856
use common_planner::plans::CreateRolePlan;
5957
use common_planner::plans::CreateStagePlan;
6058
use common_planner::plans::CreateUDFPlan;
6159
use common_planner::plans::CreateUserPlan;
60+
use common_planner::plans::CreateViewPlan;
6261
use common_planner::plans::DescribeTablePlan;
6362
use common_planner::plans::DropDatabasePlan;
6463
use common_planner::plans::DropRolePlan;
@@ -67,6 +66,7 @@ use common_planner::plans::DropTableClusterKeyPlan;
6766
use common_planner::plans::DropTablePlan;
6867
use common_planner::plans::DropUDFPlan;
6968
use common_planner::plans::DropUserPlan;
69+
use common_planner::plans::DropViewPlan;
7070
use common_planner::plans::ExistsTablePlan;
7171
use common_planner::plans::GrantPrivilegePlan;
7272
use common_planner::plans::GrantRolePlan;

0 commit comments

Comments
 (0)