[kudu-CR] KUDU-1386 NaN float and double values are not handled correctly

2016-06-28 Thread Will Berkeley (Code Review)
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/3142

to look at the new patch set (#4).

Change subject: KUDU-1386 NaN float and double values are not handled correctly
..

KUDU-1386 NaN float and double values are not handled correctly

Previously, TypeInfo::Compare always returned 0 for comparisons with NaN.
This meant that an equality predicate on a floating point column would
always return all NaN values for the column. This patch changes Compare
so that NaN compares > all non-NaN floating point values, and == to itself
(contrary to IEEE754 standard), based on the suggestion from Todd Lipcon
that we follow Postgres's example.

Change-Id: I194dcddeb8eabcc67699661b9cc9362a99f2f4ae
---
M src/kudu/client/predicate-test.cc
M src/kudu/common/key_util.cc
M src/kudu/common/types-test.cc
M src/kudu/common/types.h
4 files changed, 101 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/3142/4
-- 
To view, visit http://gerrit.cloudera.org:8080/3142
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I194dcddeb8eabcc67699661b9cc9362a99f2f4ae
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Peter Ebert
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Reviewer: Will Berkeley 


[kudu-CR] KUDU-1386 NaN float and double values are not handled correctly

2016-06-28 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1386 NaN float and double values are not handled correctly
..


Patch Set 4:

Build Started http://104.196.14.100/job/kudu-gerrit/2084/

-- 
To view, visit http://gerrit.cloudera.org:8080/3142
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I194dcddeb8eabcc67699661b9cc9362a99f2f4ae
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Peter Ebert
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Reviewer: Will Berkeley 
Gerrit-HasComments: No


[kudu-CR] KUDU-1386 NaN float and double values are not handled correctly

2016-05-24 Thread Will Berkeley (Code Review)
Will Berkeley has posted comments on this change.

Change subject: KUDU-1386 NaN float and double values are not handled correctly
..


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3142/2/src/kudu/common/types.h
File src/kudu/common/types.h:

Line 303: } else if (isnan(*lhs_n)) {
> given that nans are less common than anything else, I think it would be bes
Done.


Line 334: const double *lhs_n = reinterpret_cast(lhs);
> can you extract this code into a FloatCompare templated method?
Done.


-- 
To view, visit http://gerrit.cloudera.org:8080/3142
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I194dcddeb8eabcc67699661b9cc9362a99f2f4ae
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Dan Burkert 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-Reviewer: Will Berkeley 
Gerrit-HasComments: Yes