helgikrs opened a new issue, #8259:
URL: https://github.com/apache/arrow-datafusion/issues/8259

   ### 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
   
   ``` sql
   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
   
   ```sql
   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_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to