Airblader commented on a change in pull request #15369:
URL: https://github.com/apache/flink/pull/15369#discussion_r601232509
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/PlannerBase.scala
##########
@@ -274,6 +274,30 @@ abstract class PlannerBase(
"DataStreamTableSink",
ConnectorCatalogTable.sink(tableSink, !isStreamingMode))
+ case externalModification: ExternalModifyOperation =>
+ val input =
getRelBuilder.queryOperation(externalModification.getChild).build()
+
+ val sinkPhysicalSchema = if
(LogicalTypeChecks.isCompositeType(externalModification.getType.getLogicalType))
{
+
DataTypeUtils.expandCompositeTypeToSchema(externalModification.getType)
+ } else {
+ ResolvedSchema.of(Column.physical("f0",
externalModification.getType))
+ }
+
+ // validate query schema and sink schema, and apply cast if possible
+ val query = validateSchemaAndApplyImplicitCast(
+ input,
+ TableSchema.fromResolvedSchema(sinkPhysicalSchema),
+ null,
+ getTypeFactory)
+
+ // TODO FLINK-21934 Get rid of this workaround
Review comment:
This we still need to sort out
--
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]