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_r214535530
##########
File path:
flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
##########
@@ -332,6 +336,17 @@ private void callShowTables() {
terminal.flush();
}
+ private void callShowViews() {
+ final Set<String> views = context.getViews().keySet();
+
+ if (views.isEmpty()) {
+
terminal.writer().println(CliStrings.messageInfo(CliStrings.MESSAGE_EMPTY).toAnsi());
+ } else {
+ views.forEach((v) -> terminal.writer().println(v));
Review comment:
Would it better to sort views in alphabetical order(also for show
functions)? Show tables did in this way as table names stored in a TreeSet in
table environment.
What do you think? @twalthr @yanghua
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services