godfreyhe commented on a change in pull request #12456:
URL: https://github.com/apache/flink/pull/12456#discussion_r434505868
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
##########
@@ -697,7 +697,7 @@ private void registerFunctions(Map<String,
FunctionDefinition> functions) {
private void registerView(ViewEntry viewEntry) {
Review comment:
rename `registerView` to `registerTemporaryView` ?
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/SqlCommandParser.java
##########
@@ -114,12 +114,8 @@ private SqlCommandParser() {
cmd = SqlCommand.ALTER_TABLE;
} else if (operation instanceof CreateViewOperation) {
cmd = SqlCommand.CREATE_VIEW;
- CreateViewOperation op = (CreateViewOperation)
operation;
Review comment:
SqlCommandParserTest should also be updated
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
##########
@@ -602,42 +602,22 @@ private void callDropTable(SqlCommandCall cmdCall) {
}
private void callCreateView(SqlCommandCall cmdCall) {
- final String name = cmdCall.operands[0];
- final String query = cmdCall.operands[1];
-
- final ViewEntry previousView =
executor.listViews(sessionId).get(name);
- if (previousView != null) {
-
printExecutionError(CliStrings.MESSAGE_VIEW_ALREADY_EXISTS);
Review comment:
delete MESSAGE_VIEW_ALREADY_EXISTS, MESSAGE_VIEW_NOT_FOUND,
MESSAGE_VIEW_NOT_REMOVED from CliStrings
##########
File path:
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/LocalExecutorITCase.java
##########
@@ -168,16 +179,19 @@ public void testViews() throws Exception {
"TestView2");
assertEquals(expectedTables, actualTables);
+ // Although AdditionalView2 needs AdditionalView1, dropping
AdditionalView1 first does not
+ // throw.
Review comment:
Incomplete sentence ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]