mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-22 16:00:38 +00:00
refactor: remove optimize function completely
This commit is contained in:
@@ -354,25 +354,6 @@ impl DatafusionQueryEngine {
|
||||
Ok(physical_plan)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
pub fn optimize(
|
||||
&self,
|
||||
context: &QueryEngineContext,
|
||||
plan: &LogicalPlan,
|
||||
) -> Result<LogicalPlan> {
|
||||
let _timer = metrics::OPTIMIZE_LOGICAL_ELAPSED.start_timer();
|
||||
|
||||
// Optimized by extension rules
|
||||
let optimized_plan = self
|
||||
.state
|
||||
.optimize_by_extension_rules(plan.clone(), context)?;
|
||||
|
||||
// Optimized by datafusion optimizer
|
||||
let optimized_plan = self.state.session_state().optimize(&optimized_plan)?;
|
||||
|
||||
Ok(optimized_plan)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
fn optimize_physical_plan(
|
||||
&self,
|
||||
|
||||
@@ -419,7 +419,7 @@ impl DfLogicalPlanner {
|
||||
///
|
||||
/// This function walks through all expressions in the logical plan,
|
||||
/// including subqueries, to identify placeholders and their cast types.
|
||||
pub(crate) fn extract_placeholder_cast_types(
|
||||
fn extract_placeholder_cast_types(
|
||||
plan: &LogicalPlan,
|
||||
) -> Result<HashMap<String, Option<DataType>>> {
|
||||
let mut placeholder_types = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user