apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.93k stars 1.12k forks source link

Implement `Debug` for `SessionStateBuilder #12555

Open alamb opened 2 hours ago

alamb commented 2 hours ago

Is your feature request related to a problem or challenge?

Part of https://github.com/apache/datafusion/issues/12550

While working on https://github.com/datafusion-contrib/datafusion-dft I found it would be nice to have Debug for SessionStateBuilder so I could debug the actual state

Describe the solution you'd like

I would like SessionStateBuilder to implement Debug

Describe alternatives you've considered

I started working on this and it turns out many of the sub structs (like Analyzer and Optimizer don't implement debug). This I recommend making a series of PRs to slowly add debug to the necessary structures so we can enable it for evertthing

Additional context

No response

alamb commented 2 hours ago

A good way to find out what is left would be to put #[derive(Debug)] on SessionStateBuilder and then work down the errors

alamb commented 2 hours ago

I think this is also a good first issue as it has a well defined scope and it is largely mechanical (doesn't require deep codebase knowledge)

Note I made a first step here: https://github.com/apache/datafusion/pull/12556

alamb commented 2 hours ago

Here is another PR: https://github.com/apache/datafusion/pull/12557