Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 committed Jul 9, 2024
1 parent 089c43c commit 21e8e96
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/frontend/src/optimizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,6 @@ impl PlanRoot {
/// Optimize and generate a singleton batch physical plan without exchange nodes.
pub fn gen_batch_plan(&mut self) -> Result<PlanRef> {
assert_eq!(self.plan.convention(), Convention::Logical);
let is_streaming = match &self.phase {
PlanPhase::OptimizedLogicalForBatch | PlanPhase::Batch => Some(false),
PlanPhase::OptimizedLogicalForStream | PlanPhase::Stream => Some(true),
PlanPhase::Logical => None,
};
let mut plan = match self.phase {
PlanPhase::Logical => {
// Logical optimization
Expand All @@ -309,9 +304,7 @@ impl PlanRoot {
}
};

if is_streaming.unwrap_or(false)
&& TemporalJoinValidator::exist_dangling_temporal_scan(plan.clone())
{
if TemporalJoinValidator::exist_dangling_temporal_scan(plan.clone()) {
return Err(ErrorCode::NotSupported(
"do not support temporal join for batch queries".to_string(),
"please use temporal join in streaming queries".to_string(),
Expand Down

0 comments on commit 21e8e96

Please sign in to comment.