reifydb-rql 0.5.0

ReifyDB Query Language (RQL) parser and AST
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 ReifyDB

//! Physical-plan post-passes. Walks the lowered plan and applies expression-level rewrites - constant folding,
//! projection simplification - that were not worth doing during logical compilation. New optimisations register
//! through the same `walk_expressions_mut` interface so they can be composed without re-traversing the plan once
//! per pass.

pub mod fold;
pub mod walk;

use crate::plan::physical::PhysicalPlan;

pub fn optimize_physical(plan: &mut PhysicalPlan<'_>) {
	walk::walk_expressions_mut(plan, &mut fold::fold, &mut fold::fold_projection);
}