Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16174 )

Change subject: IMPALA-9925 cast(pow(2, 31) as int) return 2147483647 on aarch64
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/16174/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/16174/1//COMMIT_MSG@9
PS1, Line 9: cast(pow(2, 31) as int) return 2147483647 on aarch64
           : but return 2147483648 on x86
           : I think aarch64 is correct.
Why do you think 2147483647 is the correct result? 2147483647 is 2^31 - 1.

2^31 is 2147483648. However, it cannot be represented in a signed 32-bit 
integer because 1000...000 means -2147483648. That's the reason the tests must 
use multiplication with -1, or abs().


http://gerrit.cloudera.org:8080/#/c/16174/1/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

http://gerrit.cloudera.org:8080/#/c/16174/1/be/src/exprs/expr-test.cc@5810
PS1, Line 5810: ifndef
nit: instead of 'if not def', you could just use #ifdef to make the code a bit 
more readable.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I58ab52acebb9bcddbf298efa886fd30ce35f68bf
Gerrit-Change-Number: 16174
Gerrit-PatchSet: 1
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Mon, 13 Jul 2020 13:57:50 +0000
Gerrit-HasComments: Yes

Reply via email to