Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14588 )

Change subject: IMPALA-6660: Change -0/+0 floating point to compare as equal in 
hash table
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14588/4/be/src/codegen/codegen-anyval.cc
File be/src/codegen/codegen-anyval.cc:

http://gerrit.cloudera.org:8080/#/c/14588/4/be/src/codegen/codegen-anyval.cc@787
PS4, Line 787:       // Check for -0 == +0 equality
             :       llvm::Value* cmp_zero = 
builder_->CreateFCmpOEQ(ConvertToPositiveZero(local_val),
             :           ConvertToPositiveZero(val), "cmp_zero");
             :       llvm::Value* cmp_raw_zero =
             :           builder_->CreateOr(cmp_raw, cmp_zero, 
"cmp_raw_with_zero");
Can you check whether this is really needed?


http://gerrit.cloudera.org:8080/#/c/14588/4/be/src/exec/hash-table.cc
File be/src/exec/hash-table.cc:

http://gerrit.cloudera.org:8080/#/c/14588/4/be/src/exec/hash-table.cc@257
PS4, Line 257:         if (RawValue::IsFloatingZero(val, expr_type)) {
             :           val = 
const_cast<void*>(RawValue::PositiveFloatingZero(expr_type));
             :         }
             :         if (RawValue::IsFloatingZero(loc, expr_type)) {
             :           loc = 
const_cast<void*>(RawValue::PositiveFloatingZero(expr_type));
             :         }
             :         if (RawValue::Eq(loc, val, expr_type)) continue;
Does this actually make a difference? RawValue::Eq simply compares doubles and 
floats with == which should return true for 0.0=-0.0

I think that the only functional difference is using CanonicalValue in EvalRow, 
because its output is hashed bit by bit, so -0 and 0 are different there.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 4
Gerrit-Owner: Norbert Luksa <norbert.lu...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Norbert Luksa <norbert.lu...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Thu, 14 Nov 2019 16:59:35 +0000
Gerrit-HasComments: Yes

Reply via email to