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

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   https://github.com/apache/arrow-datafusion/pull/2830 added the sql to define 
a view into `information_schema.tables`
   
   While this is useful, it isn't the standard location for such information -- 
the standard location is `information_schema.views`
   
   For example, in mysql:
   
   ```sql
   mysql> select table_catalog, table_schema, table_name, view_definition from 
information_schema.views where table_name = 'ff';
   
+---------------+--------------+------------+------------------------------------------------+
   | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | VIEW_DEFINITION                
                |
   
+---------------+--------------+------------+------------------------------------------------+
   | def           | foo          | ff         | select count(0) AS `count(*)` 
from `foo`.`foo` |
   
+---------------+--------------+------------+------------------------------------------------+
   1 row in set (0.00 sec)
   ```
   
   
   
   **Describe the solution you'd like**
   1. Add `information_schema.views` (following the model of 
`information_schema.tables`, e.g. 
https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/src/catalog/information_schema.rs#L136-L142)
   2. Remove the non standard column `definition` from 
`information_schema.tables`
   3. Update `SHOW CREATE TABLE` to use `information_schema.views`
   
   **Describe alternatives you've considered**
   N/A
   
   **Additional context**
   Kudos to @mrob95  for the initial implementation. 


-- 
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: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to