xudong963 opened a new issue #2027:
URL: https://github.com/apache/arrow-datafusion/issues/2027


   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   Currently, DataFusion creates column names by 
https://github.com/apache/arrow-datafusion/blob/7be0e268a69ffecbf06823c98ca572733dddb29e/datafusion/src/physical_plan/planner.rs#L91.
  
   The approach has two existing problems:
   1. result in potential bugs, such as 
https://github.com/apache/arrow-datafusion/issues/1818.
   2. Makes the printed table unattractive and may be very wide, such as
   ```sql
   ❯ select COALESCE(null, null, null, null);
   +-------------------------------------------------------+
   | coalesce(Utf8(NULL),Utf8(NULL),Utf8(NULL),Utf8(NULL)) |
   +-------------------------------------------------------+
   |                                                       |
   +-------------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   ```
   **Describe the solution you'd like**
   1. Simplify default column names by modifying 
https://github.com/apache/arrow-datafusion/blob/7be0e268a69ffecbf06823c98ca572733dddb29e/datafusion/src/physical_plan/planner.rs#L91.
   2. Directly define a default column name, such as `?column?` in postgres:
   ```sql
   postgres=# select 1, 2;
    ?column? | ?column?
   ----------+----------
           1 |        2
   (1 row)
   ```
   


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