You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Neville Li (JIRA)" <ji...@apache.org> on 2019/08/12 15:42:00 UTC
[jira] [Commented] (BEAM-7956) FloatCoder and DoubleCoder
structuralValue doesn't handle NaN
[ https://issues.apache.org/jira/browse/BEAM-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16905319#comment-16905319 ]
Neville Li commented on BEAM-7956:
----------------------------------
Actually this might be due to how scala handles primitive types and boxing. I'll investigate more.
> FloatCoder and DoubleCoder structuralValue doesn't handle NaN
> -------------------------------------------------------------
>
> Key: BEAM-7956
> URL: https://issues.apache.org/jira/browse/BEAM-7956
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Affects Versions: 2.14.0
> Reporter: Neville Li
> Priority: Trivial
>
> Comparing {{Float}} and {{Double}} {{NaN}} values always yields {{false}}, even though they serialize consistently to the same byte array.
> {{FloatCoder}} and {{DoubleCoder}} override {{consistentWithEquals}} to {{true}} but doesn't override {{structuralValue}} which return the orignal {{NaN}} and fails comparison.
> This trips {{MutationDetectors}} in tests.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)