Skip to content

Commit

Permalink
Modify test.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Nov 17, 2021
1 parent fe8445d commit ebf67d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,7 @@ mod tests {
}

#[tokio::test]
async fn ctx_sql_should_optimize_plan() -> Result<()> {
async fn ctx_sql_should_not_optimize_plan() -> Result<()> {
let mut ctx = ExecutionContext::new();
let plan1 = ctx
.create_logical_plan("SELECT * FROM (SELECT 1) AS one WHERE TRUE AND TRUE")?;
Expand All @@ -3125,11 +3125,16 @@ mod tests {
.sql("SELECT * FROM (SELECT 1) AS one WHERE TRUE AND TRUE")
.await?;

assert_eq!(
assert_ne!(
format!("{:?}", opt_plan1),
format!("{:?}", plan2.to_logical_plan())
);

assert_eq!(
format!("{:?}", opt_plan1),
format!("{:?}", ctx.optimize(&plan2.to_logical_plan())?)
);

Ok(())
}

Expand Down

0 comments on commit ebf67d3

Please sign in to comment.