alamb commented on code in PR #17813:
URL: https://github.com/apache/datafusion/pull/17813#discussion_r2414865680
##########
datafusion/core/tests/tpcds_planning.rs:
##########
@@ -1052,9 +1052,10 @@ async fn regression_test(query_no: u8, create_physical:
bool) -> Result<()> {
for sql in &sql {
let df = ctx.sql(sql).await?;
let (state, plan) = df.into_parts();
- let plan = state.optimize(&plan)?;
if create_physical {
let _ = state.create_physical_plan(&plan).await?;
+ } else {
+ let _ = state.optimize(&plan)?;
Review Comment:
```suggestion
// Run the logical optimizer even if we are not creating the
physical plan
// to ensure it will properly succeed
let _ = state.optimize(&plan)?;
```
##########
datafusion/core/tests/tpcds_planning.rs:
##########
@@ -1052,9 +1052,10 @@ async fn regression_test(query_no: u8, create_physical:
bool) -> Result<()> {
for sql in &sql {
let df = ctx.sql(sql).await?;
let (state, plan) = df.into_parts();
- let plan = state.optimize(&plan)?;
if create_physical {
let _ = state.create_physical_plan(&plan).await?;
+ } else {
+ let _ = state.optimize(&plan)?;
Review Comment:
Some context about why the optimizer is run, but ignored might help prevent
future refactors from losing it accidentally
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]