Tartarus0zm commented on code in PR #22839:
URL: https://github.com/apache/flink/pull/22839#discussion_r1255185193
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java:
##########
@@ -816,7 +825,56 @@ public TableResultInternal
executeInternal(List<ModifyOperation> operations) {
List<Transformation<?>> transformations = translate(mapOperations);
List<String> sinkIdentifierNames =
extractSinkIdentifierNames(mapOperations);
- return executeInternal(transformations, sinkIdentifierNames);
+ return executeInternal(transformations, sinkIdentifierNames,
jobStatusHookList);
+ }
+
+ private ModifyOperation getOperation(
+ CreateTableASOperation ctasOperation, List<JobStatusHook>
jobStatusHookList) {
+ CreateTableOperation createTableOperation =
ctasOperation.getCreateTableOperation();
+ ObjectIdentifier tableIdentifier =
createTableOperation.getTableIdentifier();
+ Catalog catalog =
catalogManager.getCatalog(tableIdentifier.getCatalogName()).orElse(null);
+ ResolvedCatalogTable catalogTable =
+
catalogManager.resolveCatalogTable(createTableOperation.getCatalogTable());
+
+ if (!TableFactoryUtil.isLegacyConnectorOptions(
+ catalog,
+ tableConfig,
+ isStreamingMode,
+ tableIdentifier,
+ catalogTable,
+ createTableOperation.isTemporary())) {
+ DynamicTableSink dynamicTableSink =
+ ExecutableOperationUtils.createDynamicTableSink(
+ catalog,
+ () ->
moduleManager.getFactory((Module::getTableSinkFactory)),
+ tableIdentifier,
+ catalogTable,
+ Collections.emptyMap(),
+ tableConfig,
+ resourceManager.getUserClassLoader(),
+ createTableOperation.isTemporary());
+ if (dynamicTableSink instanceof SupportsStaging
Review Comment:
good catch
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]