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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org