Xuebin Su has posted comments on this change. ( http://gerrit.cloudera.org:8080/21755 )
Change subject: IMPALA-13287: Check overflow for bigint arithmetic ...................................................................... Patch Set 3: (1 comment) Thanks for your feedbacks! http://gerrit.cloudera.org:8080/#/c/21755/2/testdata/workloads/functional-query/queries/QueryTest/overflow.test File testdata/workloads/functional-query/queries/QueryTest/overflow.test: http://gerrit.cloudera.org:8080/#/c/21755/2/testdata/workloads/functional-query/queries/QueryTest/overflow.test@14 PS2, Line 14: ---- QUERY: Bigint addition overflow : select 9223372036854775807 + 1; : ---- CATCH : Bigint expression overflowed : ==== : ---- QUERY: Bigint subtraction overflow : select -9223372036854775808 - 1; : ---- CATCH : Bigint expression overflowed : ==== : ---- QUERY: Bigint multiplication overflow : # 4294967296 is 2^32 : select 4294967296 * 4294967296; : ---- CATCH : Bigint expression overflowed : ==== > Can you add these and non-overflow expression into expr-benchmark.cc, under Hi! I added new microbenchmarks in expr-benchmark. On my machine, they show that - in the non-overflow case, the preformance almost does not change, while - in the overflow case, the performance drops by about 15%. I think the extra time is mainly spent on error reporting. In the microbenchmark, error reporting happens many times (in `FunctionContext::SetError()`), while in the real world, it will only happen once per query. What do you think? Is my understanding correct? Thanks! -- To view, visit http://gerrit.cloudera.org:8080/21755 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf22bef737caeab241ac3c708f43c5a72bb22350 Gerrit-Change-Number: 21755 Gerrit-PatchSet: 3 Gerrit-Owner: Xuebin Su <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Xuebin Su <[email protected]> Gerrit-Comment-Date: Wed, 23 Oct 2024 08:18:52 +0000 Gerrit-HasComments: Yes
