hehuiyuan commented on a change in pull request #9054: [FLINK-13183][Table]Add a PrintTableSink URL: https://github.com/apache/flink/pull/9054#discussion_r302340288
########## File path: flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/sinks/PrintTableSink.java ########## @@ -0,0 +1,63 @@ +package org.apache.flink.table.sinks; + +import org.apache.flink.api.common.typeinfo.TypeInformation; +import org.apache.flink.api.java.DataSet; +import org.apache.flink.api.java.typeutils.RowTypeInfo; +import org.apache.flink.streaming.api.datastream.DataStream; +import org.apache.flink.streaming.api.datastream.DataStreamSink; +import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction; +import org.apache.flink.table.utils.TableConnectorUtils; + +/** + * A simple {@link TableSink} to emit data to the standard output stream. + */ +public class PrintTableSink implements BatchTableSink , AppendStreamTableSink { + + private String[] fieldNames; + private TypeInformation<?>[] fieldTypes; + + @Override + public void emitDataSet(DataSet dataSet) { + try { + dataSet.print(); + } catch (Exception e) { + e.printStackTrace(); Review comment: ok ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services