-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON version of display_indent()
#2889
Labels
enhancement
New feature or request
Comments
As a potential implementation option, we could use something like https://docs.serde.rs/serde_json/ with our existing visitor pattern. I know some folks are reticent to add dependencies though, so I thought I would open this up for discussion. I'm after the ends, the means I'm flexible on. |
tustvold
added a commit
to tustvold/arrow-datafusion
that referenced
this issue
Jul 13, 2022
tustvold
added a commit
that referenced
this issue
Jul 17, 2022
* Add optional serde support to datafusion-proto (#2889) * Add public methods for JSON serde (#64) * Misc suggestions * Update datafusion/proto/Cargo.toml Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> * Fixes * Fixup Cargo.toml * Format Cargo.toml Co-authored-by: Brent Gardner <bgardner@squarelabs.net>
Thank you!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A significant portion of my time on #2885 was spent manually formatting subqueries like:
into
because the indents aren't trustworthy when subqueries are taken into account.
Also, I've had a hard time writing unit tests for optimizers because building them programmatically is verbose and error-prone.
Describe the solution you'd like
If we were to create a visitor method like
display_json()
, and an equivalentLogicalPlan::from_json()
then both problems would be solved fairly elegantly. As a bonus, plans would be readable and manipulable by common off the the shelf tools and readable by the uninitiated.Describe alternatives you've considered
Fixing the indentation on the formatter, writing different types of tests, crying into my beer.
The text was updated successfully, but these errors were encountered: