[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 10: Verified+1


--
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: 10
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 19:14:23 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 10: Code-Review+2


--
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: 10
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 14:35:39 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 10:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/5298/ 
DRY_RUN=false


--
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: 10
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 14:35:40 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Zoltan Borok-Nagy (Code Review)
Zoltan Borok-Nagy 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 9: Code-Review+2


--
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: 9
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 14:34:53 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Norbert Luksa (Code Review)
Hello Daniel Becker, Zoltan Borok-Nagy, Csaba Ringhofer, Tim Armstrong, Impala 
Public Jenkins,

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

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

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

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

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

Currently -0.0/+0.0 values are hashed to different values due to
their different binary representation, while -0.0==+0.0 is true in
C++. This caused them to be distinct values in hash maps despite
being treated as equal in comparisons.

This commit fixes the hashing of -0.0/+0.0, thus changing the
behaviour of hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added e2e tests for aggregation (group by and distinct) and
   join queries with -0.0 and +0.0 present.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 100 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/9
--
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: newpatchset
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 9
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 8:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG@14
PS8, Line 14: chaning
> nit: changing
Done


http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG@20
PS8, Line 20: unit tests
> nit: e2e tests (end-to-end tests)
Done



--
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: 8
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 14:31:45 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-26 Thread Zoltan Borok-Nagy (Code Review)
Zoltan Borok-Nagy 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 8: Code-Review+2

(2 comments)

Found two nits in the commit message, otherwise lgtm.

http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG@14
PS8, Line 14: chaning
nit: changing


http://gerrit.cloudera.org:8080/#/c/14588/8//COMMIT_MSG@20
PS8, Line 20: unit tests
nit: e2e tests (end-to-end tests)



--
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: 8
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 10:21:52 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-25 Thread Tim Armstrong (Code Review)
Tim Armstrong 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 8: Code-Review+1


--
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: 8
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 26 Nov 2019 02:11:04 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 8:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/5117/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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: 8
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:55:39 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 7:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/5116/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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: 7
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:44:14 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Norbert Luksa (Code Review)
Norbert Luksa has uploaded a new patch set (#8). ( 
http://gerrit.cloudera.org:8080/14588 )

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

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

Currently -0.0/+0.0 values are hashed to different values due to
their different binary representation, while -0.0==+0.0 is true in
C++. This caused them to be distinct values in hash maps despite
being treated as equal in comparisons.

This commit fixes the hashing of -0.0/+0.0, thus chaning the
behaviour of hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added unit tests for aggregation (group by and distinct) and
   join queries with -0.0 and +0.0 present.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 100 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/8
--
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: newpatchset
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 8
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h
File be/src/runtime/raw-value.h:

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h@46
PS5, Line 46:   static const double CANONICAL_DOUBLE_ZERO;
> Done. Here I also had to change nan("") to quiet_NaN(), because only the la
While we're at it, I also updated ASCII_PRECISION.



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:11:07 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h
File be/src/runtime/raw-value.h:

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h@46
PS5, Line 46:   static constexpr double CANONICAL_DOUBLE_ZERO = 0.0;
> Oh I didn't realise the constexpr subtlety - C++ is confusing. Would be goo
Done. Here I also had to change nan("") to quiet_NaN(), because only the latter 
is a constexpr.



--
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: 7
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Fri, 22 Nov 2019 10:00:03 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-22 Thread Norbert Luksa (Code Review)
Norbert Luksa has uploaded a new patch set (#7). ( 
http://gerrit.cloudera.org:8080/14588 )

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

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

Currently -0.0/+0.0 values are hashed to different values due to
their different binary representation, while -0.0==+0.0 is true in
C++. This caused them to be distinct values in hash maps despite
being treated as equal in comparisons.

This commit fixes the hashing of -0.0/+0.0, thus chaning the
behaviour of hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added unit tests for aggregation (group by and distinct) and
   join queries with -0.0 and +0.0 present.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 97 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/7
--
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: newpatchset
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 7
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-21 Thread Tim Armstrong (Code Review)
Tim Armstrong 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 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h
File be/src/runtime/raw-value.h:

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h@46
PS5, Line 46:   static const double CANONICAL_DOUBLE_ZERO;
> Thanks, I did not know this, updated accordingly. However, it only worked w
Oh I didn't realise the constexpr subtlety - C++ is confusing. Would be good to 
fix the NAN code while we're here.



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 21 Nov 2019 17:42:45 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-21 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 5:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/14588/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/5//COMMIT_MSG@9
PS5, Line 9: Currently -0/+0 values are not treated as equal
> I would rephrase this according to what we learned from Zoltan, e.g. "Curre
Done


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

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/codegen/codegen-anyval.h@261
PS5, Line 261:  or +0/-0
> Please update the comment, inclusive_equality has no effect on this.
Done


http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h
File be/src/runtime/raw-value.h:

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h@46
PS5, Line 46:   static const double CANONICAL_DOUBLE_ZERO;
> I'd suggest putting the value here instead of in the .cc, so that the value
Thanks, I did not know this, updated accordingly. However, it only worked with 
constexpr, since we have a non-integral type.
Shouldn't the NaN values get changed similarly?



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 21 Nov 2019 11:43:47 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Tim Armstrong (Code Review)
Tim Armstrong 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 5: Code-Review+1

(1 comment)

Thanks for fixing!

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h
File be/src/runtime/raw-value.h:

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/runtime/raw-value.h@46
PS5, Line 46:   static const double CANONICAL_DOUBLE_ZERO;
I'd suggest putting the value here instead of in the .cc, so that the value can 
be inlined into other .cc files. I.e.

  // in .h
  static const double CANONICAL_DOUBLE_ZERO = 0.0;
  // in .cc
  const double RawValue::CANONICAL_DOUBLE_ZERO;

Probably not that important in this case, but there's other more perf-critical 
code where using this pattern makes a different and I'd prefer that the best 
practice be used consistently in the codebase. The neighbouring code here was 
using the suboptimal pattern.

I've seen this kinda thing make a difference in very tight loops, e.g. some of 
the parquet code.



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 21 Nov 2019 00:43:10 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Csaba Ringhofer (Code Review)
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 5: Code-Review+1

(2 comments)

Code is lgtm, some comments about comments

http://gerrit.cloudera.org:8080/#/c/14588/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/5//COMMIT_MSG@9
PS5, Line 9: Currently -0/+0 values are not treated as equal
I would rephrase this according to what we learned from Zoltan, e.g. "Currently 
-0.0/+0.0 are hashed to different values due their different binary 
representation, while -0.0==+0.0 is true in c++. This caused them to be 
distinct values in hash maps despite being treated as equal in comparisons."


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

http://gerrit.cloudera.org:8080/#/c/14588/5/be/src/codegen/codegen-anyval.h@261
PS5, Line 261:  or +0/-0
Please update the comment, inclusive_equality has no effect on this.



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Wed, 20 Nov 2019 14:51:19 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 5:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/5081/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Wed, 20 Nov 2019 10:06:14 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 5:

(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:   return builder_->CreateOr(cmp_raw, both_nan, 
"cmp_raw_with_nan");
 : }
 : case TYPE_STRING:
 : case TYPE_VARCHAR:
 : case TYPE_CHAR:
> Can you check whether this is really needed?
Same here, not 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:   }
 :   return false;
 : }
 :   }
 :   return true;
 : }
 : template bool HashTableCtx::Equals(const TupleRow*
> Does this actually make a difference? RawValue::Eq simply compares doubles
You are right, converting here does not make a difference, removed these lines.



--
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: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Wed, 20 Nov 2019 09:22:05 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Norbert Luksa (Code Review)
Norbert Luksa has uploaded a new patch set (#5). ( 
http://gerrit.cloudera.org:8080/14588 )

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

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

Currently -0/+0 values are not treated as equal. This commit changes
this behaviour for hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added unit tests for aggregation (group by and distinct) and
   join queries with -0 and +0 present.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 94 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/5
--
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: newpatchset
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 5
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-20 Thread Norbert Luksa (Code Review)
Norbert Luksa 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:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14588/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/4//COMMIT_MSG@15
PS4, Line 15: Added relevant tests
> please elaborate which tests did you extend
Done



--
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 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Wed, 20 Nov 2019 09:22:19 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-19 Thread Zoltan Borok-Nagy (Code Review)
Zoltan Borok-Nagy 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:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14588/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14588/4//COMMIT_MSG@15
PS4, Line 15: Added relevant tests
please elaborate which tests did you extend



--
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 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 19 Nov 2019 16:24:40 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-14 Thread Csaba Ringhofer (Code Review)
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(RawValue::PositiveFloatingZero(expr_type));
 : }
 : if (RawValue::IsFloatingZero(loc, expr_type)) {
 :   loc = 
const_cast(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 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 14 Nov 2019 16:59:35 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-14 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/5020/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 14 Nov 2019 09:41:13 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-14 Thread Norbert Luksa (Code Review)
Norbert Luksa 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 3:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/codegen/codegen-anyval.h@248
PS3, Line 248:   // Replaces negative zero with positive, leaves everything 
else unchanged.
> nit: maybe mention that it is for floating point numbers
Done


http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/runtime/raw-value.inline.h
File be/src/runtime/raw-value.inline.h:

http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/runtime/raw-value.inline.h@57
PS3, Line 57: std::abs
> is std::abs needed?
Done



--
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: 3
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 14 Nov 2019 08:54:19 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-14 Thread Norbert Luksa (Code Review)
Norbert Luksa has uploaded a new patch set (#4). ( 
http://gerrit.cloudera.org:8080/14588 )

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

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

Currently -0/+0 values are not treated as equal. This commit changes
this behaviour for hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added relevant tests.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 108 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/4
--
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: newpatchset
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 4
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-07 Thread Zoltan Borok-Nagy (Code Review)
Zoltan Borok-Nagy 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 3:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/codegen/codegen-anyval.h@248
PS3, Line 248:   // Replaces negative zero with positive, leaves everything 
else unchanged.
nit: maybe mention that it is for floating point numbers


http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/runtime/raw-value.inline.h
File be/src/runtime/raw-value.inline.h:

http://gerrit.cloudera.org:8080/#/c/14588/3/be/src/runtime/raw-value.inline.h@57
PS3, Line 57: std::abs
is std::abs needed?

https://stackoverflow.com/questions/45795397/behaviour-of-negative-zero-0-0-in-comparison-with-positive-zero-0-0/45795465



--
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: 3
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 07 Nov 2019 14:04:21 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-07 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins 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 3:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/4972/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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: 3
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 07 Nov 2019 10:22:35 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6660: Change -0/+0 floating point to compare as equal in hash table

2019-11-07 Thread Norbert Luksa (Code Review)
Norbert Luksa has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/14588


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

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

Currently -0/+0 values are not treated as equal. This commit changes
this behaviour for hash joins and aggregations (since aggregations
follow the behaviour of the join). That way, the canonical form for
-0/+0 is changed to +0.

Tests:
 - Added relevant tests.

Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/codegen-anyval.h
M be/src/exec/hash-table.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.h
M be/src/runtime/raw-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/aggregation.test
M testdata/workloads/functional-query/queries/QueryTest/joins.test
8 files changed, 107 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/14588/3
--
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: newchange
Gerrit-Change-Id: I6bb1a817c81c452d041238c19cb6c9f602a5d565
Gerrit-Change-Number: 14588
Gerrit-PatchSet: 3
Gerrit-Owner: Norbert Luksa 
Gerrit-Reviewer: Csaba Ringhofer 
Gerrit-Reviewer: Daniel Becker 
Gerrit-Reviewer: Norbert Luksa 
Gerrit-Reviewer: Zoltan Borok-Nagy