yyanyy opened a new pull request #2521:
URL: https://github.com/apache/iceberg/pull/2521
- fix #2405 which is caused by NPE brought in by #1872. When I changed
`containsNaN` field within partition field summary from primitive to boxed
boolean within #1872, I forgot to change other places that refers to the
primitive boolean, causing #2405 and #2495 (thanks @RussellSpitzer again for
the fix!)
- in #2405 we also investigated the other approach that can prevent this
issue - to make `containsNaN` a primitive to avoid potential NPE. This may have
the following implication:
- we generally want to assign `true` to this column so that we don't
falsely skip it; but in this case non-floating-point columns will also have
`containsNaN=true` in memory which doesn't make sense. This field isn't used
anywhere for non-floating-point columns so it won't have correctness concern.
However when displaying manifests table, this default value will be used, and
for any files written before `containsNaN` getting populated in field summary,
`containsNaN` will be displayed as `true` which may not be correct.
- there is [a case within manifest
evaluator](https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/expressions/ManifestEvaluator.java#L164)
that will produce less accurate result if we don't differentiate `true`
between actually having NaN and default value
- [public facing
interface](https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/ManifestFile.java#L209-L211)
may need to change but it's minor since it is not part of any release
In addition to fixing the NPE problem, this PR attempts to follow the
current approach (of nullable `containsNaN`) to update spec with the current
state. We can continue the discussion of how to handle it here and I'll make
sure to reflect it in the actual spec before merge.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]