gaborkaszab commented on code in PR #11216:
URL: https://github.com/apache/iceberg/pull/11216#discussion_r1969209511
##########
core/src/main/java/org/apache/iceberg/SetPartitionStatistics.java:
##########
@@ -36,7 +35,10 @@ public SetPartitionStatistics(TableOperations ops) {
@Override
public UpdatePartitionStatistics
setPartitionStatistics(PartitionStatisticsFile file) {
- Preconditions.checkArgument(null != file, "partition statistics file must
not be null");
+ if (file == null) {
Review Comment:
Shouldn't we update the comment on the interface to be clear that a null
param results a noop?
I checked the implementation again for SetStatistics.setStatistics() and
apparently there is no special handling for null inputs. I became a bit
hesitant now because there giving a null stat file as param would result in an
NPE when calling the Optional.of(statisticsFile).
Not sure now if noop is the way to go here or the Precondition was better.
Sorry to this back and forth. What do you think?
--
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]