NGA-TRAN opened a new issue, #18267:
URL: https://github.com/apache/datafusion/issues/18267

   ### Describe the bug
   
   When I use `select * from information_schema.views;` to display the 
definition of my table, the `WITH ORDER(...)` is not included.
   
   ### To Reproduce
   
   In `datafusion-cli`
   
   ```SQL
   
   -- Not sorted
   CREATE EXTERNAL TABLE  dimension_csv
   STORED AS CSV 
   LOCATION '/path/to/the/attached/dimension_1.csv'
   OPTIONS ('format.has_header' 'true');
   
   -- Sorted
   CREATE EXTERNAL TABLE  dimension_csv_sorted
   STORED AS CSV 
   WITH ORDER (env, service, host)
   LOCATION 
'/Users/hoabinhnga.tran/datafusion-optimal-plans/testdata/dimension1/dimension_1.csv'
   OPTIONS ('format.has_header' 'true');
   ```
   
   The `information_schema.views` does not display `WITH ORDER (env, service, 
host)` for table `dimension_csv_sorted`
   
   ```SQL
   select * from information_schema.views;
   
   
+---------------+--------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | table_catalog | table_schema | table_name               | definition       
                                                                                
                                                                  |
   
+---------------+--------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | datafusion    | public       | dimension_csv_sorted     | CREATE EXTERNAL 
TABLE dimension_csv_sorted STORED AS CSV LOCATION 
/Users/hoabinhnga.tran/datafusion-optimal-plans/testdata/dimension1/dimension_1.csv
              |
   | datafusion    | public       | dimension_csv            | CREATE EXTERNAL 
TABLE dimension_csv STORED AS CSV LOCATION 
/Users/hoabinhnga.tran/datafusion-optimal-plans/testdata/dimension1/dimension_1.csv
                     |
   
+---------------+--------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   
   ```
   
   
   
[dimension_1.csv](https://github.com/user-attachments/files/23124138/dimension_1.csv
   
   ### Expected behavior
   
   _No response_
   
   ### 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to