You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/21 08:31:16 UTC

[GitHub] [flink] dawidwys commented on a change in pull request #10909: [FLINK-15686][sql-client] Use old type system in CollectStreamTableSink

dawidwys commented on a change in pull request #10909: [FLINK-15686][sql-client] Use old type system in CollectStreamTableSink
URL: https://github.com/apache/flink/pull/10909#discussion_r368864607
 
 

 ##########
 File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/CollectStreamTableSink.java
 ##########
 @@ -43,21 +43,32 @@
 	private final TypeSerializer<Tuple2<Boolean, Row>> serializer;
 	private final TableSchema tableSchema;
 
-	public CollectStreamTableSink(InetAddress targetAddress, int targetPort, TypeSerializer<Tuple2<Boolean, Row>> serializer, TableSchema tableSchema) {
+	public CollectStreamTableSink(
+			InetAddress targetAddress,
+			int targetPort,
+			TypeSerializer<Tuple2<Boolean, Row>> serializer,
+			TableSchema tableSchema) {
 		this.targetAddress = targetAddress;
 		this.targetPort = targetPort;
 		this.serializer = serializer;
 		this.tableSchema = TableSchemaUtils.checkNoGeneratedColumns(tableSchema);
 
 Review comment:
   I could not decide on those two options myself. 
   
   I went for the `getFieldNames` and `getFieldTypes` methods because I thought it will be easier to track it back when fixing the `Upsert/RetractTableSink` interfaces. I thought it will be more visible that we need to fix it here as well when removing those methods. I am afraid the old type system in `TableSchema` might stick around for a bit longer than these methods. Moreover it is also how we do it e.g. in Elasticsearch retract stream.
   
   But I am fine with switching over to `TableSchema` if you think it would be better that way.

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


With regards,
Apache Git Services