[ 
https://issues.apache.org/jira/browse/FLINK-10229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606852#comment-16606852
 ] 

ASF GitHub Bot commented on FLINK-10229:
----------------------------------------

hequn8128 commented on a change in pull request #6631: [FLINK-10229] 
[sql-client] Support listing of views
URL: https://github.com/apache/flink/pull/6631#discussion_r215889007
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
 ##########
 @@ -587,6 +587,18 @@ abstract class TableEnvironment(val config: TableConfig) {
     rootSchema.getTableNames.asScala.toArray
   }
 
+  def listViews(): Array[String] = {
 
 Review comment:
   I think we can't add this function in `TableEnvironment`. Reasons are:
   - `table.isInstanceOf[RelTable]` is not necessary a View. `RelTable` can be 
registered through `registerTable()`. 
   - `TableEnvironment` currently doesn't support view. It is only supported in 
SQL-Client now.
   
   As a choice, you can list views directly from the `session` passed to the 
`listViews()`. Also pay attention to the order.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support listing of views
> ------------------------
>
>                 Key: FLINK-10229
>                 URL: https://issues.apache.org/jira/browse/FLINK-10229
>             Project: Flink
>          Issue Type: New Feature
>          Components: SQL Client
>            Reporter: Timo Walther
>            Assignee: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>
> FLINK-10163 added initial support of views for the SQL Client. According to 
> other database vendors, views are listed in the \{{SHOW TABLES}}. However, 
> there should be a way of listing only the views. We can support the \{{SHOW 
> VIEWS}} command.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to