GitHub user JoshRosen opened a pull request:
https://github.com/apache/spark/pull/7736
[SPARK-9421] Fix null-handling bugs in UnsafeRow.getDouble, getFloat(), and
get(ordinal, dataType)
UnsafeRow.getDouble and getFloat() return NaN when called on columns that
are null, which is inconsistent with the behavior of other row classes (which
is to return 0.0).
In addition, the generic get(ordinal, dataType) method should always return
null for a null literal, but currently it handles nulls by calling the
type-specific accessors.
This patch addresses both of these issues and adds a regression test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JoshRosen/spark unsafe-row-null-fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7736.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #7736
----
commit 6214682542f7ac6410461ea647ad1016133d4e63
Author: Josh Rosen <[email protected]>
Date: 2015-07-28T23:01:15Z
Fixes to null handling in UnsafeRow
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]