stevenzwu commented on code in PR #11702:
URL: https://github.com/apache/iceberg/pull/11702#discussion_r1895139276
##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/FlinkSink.java:
##########
@@ -666,8 +667,16 @@ private DataStream<RowData> distributeDataStream(
return shuffleStream
.partitionCustom(new RangePartitioner(iSchema, sortOrder), r ->
r)
- .filter(StatisticsOrRecord::hasRecord)
- .map(StatisticsOrRecord::record);
+ .flatMap(
+ (FlatMapFunction<StatisticsOrRecord, RowData>)
+ (statisticsOrRecord, out) -> {
+ if (statisticsOrRecord.hasRecord()) {
+ out.collect(statisticsOrRecord.record());
+ }
+ })
+ // Set the parallelism same as writerParallelism avoid broken
chain
Review Comment:
nit: maybe this?
```
Set the parallelism same as writerParallelism to promote operator chaining
with the downstream writer operator.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]