You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/13 17:44:36 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #2529: Implement some way to show the sql used to create a view

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

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   As suggested by @Dandandan  on https://github.com/apache/arrow-datafusion/pull/2279#discussion_r869751636 it would be very nice to be able to see the original SQL used to define a view.
   
   Apparently postgres uses a function: https://stackoverflow.com/questions/14634322/how-to-see-the-create-view-code-for-a-view-in-postgresql
   
   Mysql uses `SHOW CREATE VIEW`: https://dev.mysql.com/doc/refman/8.0/en/show-create-view.html
   
   
   ```sql
   mysql> create view f as select * from foo;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> show create view f;
   +------+----------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
   | View | Create View                                                                                                                                        | character_set_client | collation_connection |
   +------+----------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
   | f    | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `f` AS select `foo`.`bar` AS `bar`,`foo`.`baz` AS `baz` from `foo` | utf8mb4              | utf8mb4_0900_ai_ci   |
   +------+----------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
   1 row in set (0.00 sec)
   ```
   
   
   **Describe the solution you'd like**
   Store the original SQL and make it accessable via SQL
   
   **Describe alternatives you've considered**
   
   
   **Additional context**
   
   https://github.com/apache/arrow-datafusion/pull/2279
   


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow-datafusion] andygrove closed issue #2529: Implement some way to show the sql used to create a view

Posted by GitBox <gi...@apache.org>.
andygrove closed issue #2529: Implement some way to show the sql used to create a view
URL: https://github.com/apache/arrow-datafusion/issues/2529


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] comphead commented on issue #2529: Implement some way to show the sql used to create a view

Posted by GitBox <gi...@apache.org>.
comphead commented on issue #2529:
URL: https://github.com/apache/arrow-datafusion/issues/2529#issuecomment-1129034896

   @alamb when we talk about view metadata, its supposed we dont have a persistent metadata catalog? Like Hive or similar.
   
   So its expected the view is temporary, like in Spark?


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on issue #2529: Implement some way to show the sql used to create a view

Posted by GitBox <gi...@apache.org>.
alamb commented on issue #2529:
URL: https://github.com/apache/arrow-datafusion/issues/2529#issuecomment-1172680938

   Thank you very much @mrob95  -- we have appreciated all your other fine work to date as well!


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on issue #2529: Implement some way to show the sql used to create a view

Posted by GitBox <gi...@apache.org>.
alamb commented on issue #2529:
URL: https://github.com/apache/arrow-datafusion/issues/2529#issuecomment-1129994653

   @comphead  -- I think the idea is that the View definition is stored in whatever implements `TableProvider` (aka `ViewTable` in https://github.com/apache/arrow-datafusion/pull/2279/files). In order to show the original SQL somehow that information would have to be passed out (perhaps via TableProvider or some other trait)


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] mrob95 commented on issue #2529: Implement some way to show the sql used to create a view

Posted by GitBox <gi...@apache.org>.
mrob95 commented on issue #2529:
URL: https://github.com/apache/arrow-datafusion/issues/2529#issuecomment-1172660756

   I'll have a go at this


-- 
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-unsubscribe@arrow.apache.org

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