tgujar commented on issue #8361:
URL:
https://github.com/apache/arrow-datafusion/issues/8361#issuecomment-1843621027
Maybe a simple solution would be to just convert to substrait again and then
compare?
```
async fn roundtrip_with_ctx(sql: &str, ctx: SessionContext) -> Result<()> {
let df = ctx.sql(sql).await?;
let plan = df.into_optimized_plan()?;
let proto = to_substrait_plan(&plan, &ctx)?;
let plan2 = from_substrait_plan(&ctx, &proto).await?;
let plan2 = ctx.state().optimize(&plan2)?;
let proto2 = to_substrait_plan(&plan2, &ctx)?;
println!("{plan:#?}");
println!("{plan2:#?}");
assert_eq!(proto, proto2);
Ok(())
}
```
--
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]