Skip to content

datafusion-cli regression: explain plan output looks bad (error rendering multi-lines) #14947

Closed

Description

@alamb

Describe the bug

Explain plans look good in DataFusion 45:

DataFusion CLI v45.0.0
> create table foo(x int, y int) as values (1,2), (3,4);
0 row(s) fetched.
Elapsed 0.007 seconds.

> explain select * from foo where x = 4;
+---------------+---------------------------------------------------+
| plan_type     | plan                                              |
+---------------+---------------------------------------------------+
| logical_plan  | Filter: foo.x = Int32(4)                          |
|               |   TableScan: foo projection=[x, y]                |
| physical_plan | CoalesceBatchesExec: target_batch_size=8192       |
|               |   FilterExec: x@0 = 4                             |
|               |     MemoryExec: partitions=1, partition_sizes=[1] |
|               |                                                   |
+---------------+---------------------------------------------------+
2 row(s) fetched.
Elapsed 0.005 seconds.

However, they look really bad on main (aka pre-release DataFusion 46):

> create table foo(x int, y int) as values (1,2), (3,4);
0 row(s) fetched.
Elapsed 0.018 seconds.

> explain select * from foo where x = 4;
+---------------+--------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                     |
+---------------+--------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Filter: foo.x = Int32(4)
  TableScan: foo projection=[x, y]                                                              |
| physical_plan | CoalesceBatchesExec: target_batch_size=8192
  FilterExec: x@0 = 4
    DataSourceExec: partitions=1, partition_sizes=[1]
 |
+---------------+--------------------------------------------------------------------------------------------------------------------------+
2 row(s) fetched.
Elapsed 0.013 seconds.

To Reproduce

create table foo(x int, y int) as values (1,2), (3,4);
explain select * from foo where x = 4;

Expected behavior

I expect the cells to be correctly rendered like in DataFUsion 45

Additional context

This appears to be another issue introduced by

Activity

  1. added
    bugSomething isn't working
    regressionSomething that used to work no longer does
    on Feb 28, 2025
  2. alamb commented on Feb 28, 2025

    @alamb
    ContributorAuthor

    I think the issue is the code added in #14877 doesn't handle single cells with multiple lines well

  3. changed the title [-]datafusion-cli regression: explain plan output looks bad[/-] [+]datafusion-cli regression: explain plan output looks bad (error rendering multi-lines)[/+] on Feb 28, 2025
  4. alamb commented on Feb 28, 2025

    @alamb
    ContributorAuthor

    If we can't figure this out by tomorrow, I am thinking we can revert #14877. I will prepare a PR to do so as a backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionSomething that used to work no longer does

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions