[GitHub] [flink] bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] remember current catalog and database in SQL CLI SessionContext

2019-07-19 Thread GitBox
bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] 
remember current catalog and database in SQL CLI SessionContext
URL: https://github.com/apache/flink/pull/9049#discussion_r305438196
 
 

 ##
 File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/DependencyTest.java
 ##
 @@ -193,7 +200,20 @@ public Catalog createCatalog(String name, Map properties) {
ADDITIONAL_TEST_DATABASE,
new CatalogDatabaseImpl(new 
HashMap<>(), null),
false);
-   } catch (DatabaseAlreadyExistException e) {
+   hiveCatalog.createTable(
 
 Review comment:
   we have a plan to remove the dependencies


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] remember current catalog and database in SQL CLI SessionContext

2019-07-19 Thread GitBox
bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] 
remember current catalog and database in SQL CLI SessionContext
URL: https://github.com/apache/flink/pull/9049#discussion_r305437745
 
 

 ##
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
 ##
 @@ -232,7 +238,10 @@ public void useCatalog(SessionContext session, String 
catalogName) throws SqlExe
.getTableEnvironment();
 
 Review comment:
   `useCatalog` and `useDatabase` are APIs for CliClient when running SQL 
statements such as "USE CATALOG XXX". Are we talking about the same thing?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] remember current catalog and database in SQL CLI SessionContext

2019-07-18 Thread GitBox
bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] 
remember current catalog and database in SQL CLI SessionContext
URL: https://github.com/apache/flink/pull/9049#discussion_r305016325
 
 

 ##
 File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/DependencyTest.java
 ##
 @@ -193,7 +200,20 @@ public Catalog createCatalog(String name, Map properties) {
ADDITIONAL_TEST_DATABASE,
new CatalogDatabaseImpl(new 
HashMap<>(), null),
false);
-   } catch (DatabaseAlreadyExistException e) {
+   hiveCatalog.createTable(
 
 Review comment:
   yeah, the reason at that time is we don't have a good way to test and cover 
catalog discovery for `HiveCatalog`. As soon as we have end-2-end test (WIP 
https://github.com/apache/flink/pull/9149), we should be able to remove hive 
test dependencies from sql cli


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] remember current catalog and database in SQL CLI SessionContext

2019-07-18 Thread GitBox
bowenli86 commented on a change in pull request #9049: [FLINK-13176][SQL CLI] 
remember current catalog and database in SQL CLI SessionContext
URL: https://github.com/apache/flink/pull/9049#discussion_r305014586
 
 

 ##
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
 ##
 @@ -232,7 +238,10 @@ public void useCatalog(SessionContext session, String 
catalogName) throws SqlExe
.getTableEnvironment();
 
 Review comment:
   @twalthr can you elaborate a bit more? AFAICT, 
`org.apache.flink.table.client.gateway.local.LocalExecutor#validateSession` 
seems only to be responsible for creating an execution context, but cannot set 
any current catalog and current database?


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:
us...@infra.apache.org


With regards,
Apache Git Services