szehon-ho commented on code in PR #7650:
URL: https://github.com/apache/iceberg/pull/7650#discussion_r1198385588
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java:
##########
@@ -386,10 +384,14 @@ protected InternalRowWrapper
initPartitionRowWrapper(Types.StructType partitionT
protected Map<Integer, StructProjection> buildPartitionProjections(
Types.StructType partitionType, Map<Integer, PartitionSpec> specs) {
Map<Integer, StructProjection> partitionProjections = Maps.newHashMap();
- specs.forEach(
- (specID, spec) ->
- partitionProjections.put(
- specID, StructProjection.create(partitionType,
spec.partitionType())));
+
+ for (Map.Entry<Integer, PartitionSpec> entry : specs.entrySet()) {
Review Comment:
Nit: could we save some code by streaming over keySet()?
for (int specId : specs.keyset()) {
Partition spec = specs.get(specId);
...
}
Itd be nice to do a values transform, but guess there's no clean way here
--
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]