This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 060eaaf3d94f9b7c8581415bfc1731956c377aa8 Author: zhiqiang <[email protected]> AuthorDate: Wed Apr 17 10:49:56 2024 +0800 [test](xor) add test for xor #33731 --- .../data/correctness_p0/test_bit_function.out | 17 +++++++++++++++++ .../suites/correctness_p0/test_bit_function.groovy | 9 +++++++++ 2 files changed, 26 insertions(+) diff --git a/regression-test/data/correctness_p0/test_bit_function.out b/regression-test/data/correctness_p0/test_bit_function.out index 02334fcab28..ce23f704d62 100644 --- a/regression-test/data/correctness_p0/test_bit_function.out +++ b/regression-test/data/correctness_p0/test_bit_function.out @@ -134,3 +134,20 @@ -- !select -- 1 1 +-- !bitxor -- +125 -127 + +-- !bitxor -- +0 127 0 127 +1 126 -1 -128 +2 125 -2 -127 +3 124 -3 -126 +4 123 -4 -125 + +-- !bitxor -- +0 0 0 0 +1 0 -1 0 +2 0 -2 0 +3 0 -3 0 +4 0 -4 0 + diff --git a/regression-test/suites/correctness_p0/test_bit_function.groovy b/regression-test/suites/correctness_p0/test_bit_function.groovy index fc7b2c454b5..4e391997520 100644 --- a/regression-test/suites/correctness_p0/test_bit_function.groovy +++ b/regression-test/suites/correctness_p0/test_bit_function.groovy @@ -81,4 +81,13 @@ suite("test_bit_functions") { qt_select "select bit_count(bit_shift_right(-1, 63)), bit_count(bit_shift_right(-1, 63));" + qt_bitxor """ + select 2^127, -2^127; + """ + qt_bitxor """ + select number, number^127, -number, (-number)^127 from numbers("number"="5") order by number; + """ + qt_bitxor """ + select number, number^number, -number, (-number)^(-number) from numbers("number"="5") order by number + """ } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
