alamb opened a new pull request, #15427:
URL: https://github.com/apache/datafusion/pull/15427

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes https://github.com/apache/datafusion/issues/15343
   
   ## Rationale for this change
   
   We have nice explain plans, let's default DataFusion cli to use them
   
   
   ## What changes are included in this PR?
   Note that as discussed on https://github.com/apache/datafusion/issues/15343, 
this ONLY affects datafusion-cli. Any downstream project that wants nicer 
explain plans can set the default settings
   
   
   
   ## Are these changes tested?
   Yes with new tests
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   `EXPLAIN` in datafusion-cli will now use the new explain tree format. For 
example:
   
   ```sql
   DataFusion CLI v46.0.1
   > explain select 123;
   +---------------+-------------------------------+
   | plan_type     | plan                          |
   +---------------+-------------------------------+
   | physical_plan | ┌───────────────────────────┐ |
   |               | │       ProjectionExec      │ |
   |               | │    --------------------   │ |
   |               | │      Int64(123): 123      │ |
   |               | └─────────────┬─────────────┘ |
   |               | ┌─────────────┴─────────────┐ |
   |               | │     PlaceholderRowExec    │ |
   |               | └───────────────────────────┘ |
   |               |                               |
   +---------------+-------------------------------+
   1 row(s) fetched.
   Elapsed 0.026 seconds.
   ```
   
   You can get the previous indent explain plan by asking for it explicitly:
   
   ```sql
   DataFusion CLI v46.0.1
   > explain format indent select 123;
   +---------------+------------------------------------------+
   | plan_type     | plan                                     |
   +---------------+------------------------------------------+
   | logical_plan  | Projection: Int64(123)                   |
   |               |   EmptyRelation                          |
   | physical_plan | ProjectionExec: expr=[123 as Int64(123)] |
   |               |   PlaceholderRowExec                     |
   |               |                                          |
   +---------------+------------------------------------------+
   2 row(s) fetched.
   Elapsed 0.023 seconds.
   ```


-- 
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