-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
ContainsNan is a primitive boolean in ManifestFileUtil
| private final boolean containsNaN; |
But a boxed Boolean in GenericPartitionFieldSummary
| private Boolean containsNaN = null; |
This is also a problem because the interface for partition field summary also declares the return type to be boxed and returns null by default
iceberg/api/src/main/java/org/apache/iceberg/ManifestFile.java
Lines 209 to 211 in 6c6096d
| default Boolean containsNaN() { | |
| return null; | |
| } |
Which can lead to an NPE if the GPFS = null
Boolean x = null;
boolean y = x; // NullPointerExceptionCaused by: java.lang.NullPointerException
at org.apache.iceberg.util.ManifestFileUtil$FieldSummary.<init>(ManifestFileUtil.java:54)
at org.apache.iceberg.util.ManifestFileUtil.summaries(ManifestFileUtil.java:150)
at org.apache.iceberg.util.ManifestFileUtil.canContainAny(ManifestFileUtil.java:131)
at org.apache.iceberg.ManifestFilterManager.canContainDeletedFiles(ManifestFilterManager.java:329)
at org.apache.iceberg.ManifestFilterManager.filterManifest(ManifestFilterManager.java:285)
at org.apache.iceberg.ManifestFilterManager.lambda$filterManifests$0(ManifestFilterManager.java:182)
at org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:404)
at org.apache.iceberg.util.Tasks$Builder.access$300(Tasks.java:70)
at org.apache.iceberg.util.Tasks$Builder$1.run(Tasks.java:310)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 3 moreMetadata
Metadata
Assignees
Labels
No labels