slinkydeveloper commented on a change in pull request #17739:
URL: https://github.com/apache/flink/pull/17739#discussion_r748333800
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/StaticResultProvider.java
##########
@@ -64,6 +66,23 @@ public StaticResultProvider setJobClient(JobClient
jobClient) {
return CloseableIterator.adapterForIterator(this.rows.iterator());
}
+ @Override
+ public RowDataToStringConverter getRowDataStringConverter() {
+ return rowData -> {
+ // This cast is safe because the values from the
toInternalIterator are always going to
+ // be instanced as GenericRowData (look rowToInternalRow below).
+ GenericRowData genericRowData = (GenericRowData) rowData;
+ String[] results = new String[rowData.getArity()];
+ for (int i = 0; i < results.length; i++) {
+ results[i] =
+ genericRowData.isNullAt(i)
+ ? PrintStyle.NULL_VALUE
+ : "" + genericRowData.getField(i);
Review comment:
Uhm i'm not sure what you mean with this comment. Look at the new
changes, I've unified the `RowDataToStringConverter` created here and in
`InsertResultProvider`.
--
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]