openinx commented on a change in pull request #9981: [FLINK-13195][sql-client]
Add create table support for SqlClient
URL: https://github.com/apache/flink/pull/9981#discussion_r344630390
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
##########
@@ -204,13 +208,8 @@ public ClusterID getClusterId() {
return
clusterClientFactory.createClusterDescriptor(executorConfig);
}
- public EnvironmentInstance createEnvironmentInstance() {
- try {
- return wrapClassLoader(EnvironmentInstance::new);
- } catch (Throwable t) {
- // catch everything such that a wrong environment does
not affect invocations
- throw new SqlExecutionException("Could not create
environment instance.", t);
- }
+ public EnvironmentInstance getEnvironmentInstance() {
Review comment:
IMO, the sessionContext only have parts of the info about the SQL session,
properties and views but have no tables and catalogs, functions etc. the
ExecutionContext have all of the things, so in theory, the state we need to
save is `ExecutionContext`. For EnvironmentInstance, it's a wrapper of
ExecutionContext.
----------------------------------------------------------------
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]
With regards,
Apache Git Services