findepi commented on issue #8230:
URL: https://github.com/apache/datafusion/issues/8230#issuecomment-2207189123

   I tried to do this by appending the following at the end of 
`assert_optimized` definition in `replace_with_order_preserving_variants.rs`:
   
   ```diff
   @@ -399,10 +405,17 @@ mod tests {
                let actual = get_plan_string(&optimized_physical_plan);
                assert_eq!(
                    expected_optimized_lines, actual,
                    "\n**Optimized Plan 
Mismatch\n\nexpected:\n\n{expected_optimized_lines:#?}\nactual:\n\n{actual:#?}\n\n"
                );
   +
   +            let ctx = SessionContext::new();
   +            let object_store = InMemory::new();
   +            object_store.put(&object_store::path::Path::from("file_path"), 
bytes::Bytes::from("").into()).await?;
   +            ctx.register_object_store(&Url::parse("test://").unwrap(), 
Arc::new(object_store));
   +            let task_ctx = Arc::new(TaskContext::from(&ctx));
   +            collect(optimized_physical_plan, task_ctx).await?;
            };
        }
   ```
   
   but this leads to `internal error: entered unreachable code` errors from 
https://github.com/apache/datafusion/blob/5501e8eb326b808a9877d9a8cb743cbb428ecc8a/datafusion/core/src/test/mod.rs#L300
   and `partition not used yet` errors from 
https://github.com/apache/datafusion/blob/b76c1b70506e45880f8e4bc5f9dc2ef088053acb/datafusion/physical-plan/src/repartition/mod.rs#L599
   
   Clearly the context setup is not sufficient to execute the plans. 
@mustafasrepo would you be willing to give me a hand and suggest what I am 
doing wrong?
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to