Skip to content

Explain on a plan containing a list literal is very verbose in v33 #8259

@helgikrs

Description

@helgikrs

Describe the bug

The array within ScalarValue::List is printed as-is when explaining a plan containing a list literal. It makes the plan difficult to read.

To Reproduce

DataFusion CLI v33.0.0

❯ explain select make_array(1, 2, 3);
+---------------+----------------------------------------------------------+
| plan_type     | plan                                                     |
+---------------+----------------------------------------------------------+
| logical_plan  | Projection: List([ListArray                              |
|               | [                                                        |
|               |   PrimitiveArray<Int64>                                  |
|               | [                                                        |
|               |   1,                                                     |
|               |   2,                                                     |
|               |   3,                                                     |
|               | ],                                                       |
|               | ]]) AS make_array(Int64(1),Int64(2),Int64(3))            |
|               |   EmptyRelation                                          |
| physical_plan | ProjectionExec: expr=[+-----------+                      |
|               | | col       |                                            |
|               | +-----------+                                            |
|               | | [1, 2, 3] |                                            |
|               | +-----------+ as make_array(Int64(1),Int64(2),Int64(3))] |
|               |   EmptyExec: produce_one_row=true                        |
|               |                                                          |
+---------------+----------------------------------------------------------+

Expected behavior

Something similar to the previous release. Here's the output from DataFusion v32.0.0

DataFusion CLI v32.0.0
❯ explain select make_array(1, 2, 3);
+---------------+------------------------------------------------------------------------+
| plan_type     | plan                                                                   |
+---------------+------------------------------------------------------------------------+
| logical_plan  | Projection: List([1,2,3]) AS make_array(Int64(1),Int64(2),Int64(3))    |
|               |   EmptyRelation                                                        |
| physical_plan | ProjectionExec: expr=[1,2,3 as make_array(Int64(1),Int64(2),Int64(3))] |
|               |   EmptyExec: produce_one_row=true                                      |
|               |                                                                        |
+---------------+------------------------------------------------------------------------+

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions