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 02:41:36 UTC

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

JingsongLi 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_r368788817
 
 

 ##########
 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:
   Can we override `getTableSchema` directly:
   ```
       @Override
   	public TableSchema getTableSchema() {
   		// We use the old type system here to be consistent with getRecordType.
   		return new TableSchema(tableSchema.getFieldNames(), tableSchema.getFieldTypes());
   	}
   ```
   I think `getFieldNames` and `getFieldTypes` is not so intuitive.

----------------------------------------------------------------
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