You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/14 15:04:17 UTC

[GitHub] [arrow] zhztheplayer opened a new pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

zhztheplayer opened a new pull request #7965:
URL: https://github.com/apache/arrow/pull/7965


   https://issues.apache.org/jira/browse/ARROW-9737


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] zhztheplayer commented on a change in pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
zhztheplayer commented on a change in pull request #7965:
URL: https://github.com/apache/arrow/pull/7965#discussion_r478793658



##########
File path: cpp/src/gandiva/precompiled/arithmetic_ops_test.cc
##########
@@ -120,6 +120,14 @@ TEST(TestArithmeticOps, TestBitwiseOps) {
             0xFFFFFFFFFFFFFF7E);
   EXPECT_EQ(bitwise_or_int64_int64(0x6A5B1, 0x00000), 0x6A5B1);
 
+  // bitwise XOR
+  EXPECT_EQ(bitwise_xor_int32_int32(0x0147D, 0x17159), 0x16524);
+  EXPECT_EQ(bitwise_xor_int32_int32(0xFFFFFFCC, 0x00000297), 0XFFFFFD5B);
+  EXPECT_EQ(bitwise_xor_int32_int32(0x000, 0x285), 0x285);
+  EXPECT_EQ(bitwise_xor_int64_int64(0x563672F83, 0x0D9FCF85B), 0x5BA9BD7D8);
+  EXPECT_EQ(bitwise_xor_int64_int64(0xFFFFFFFFFFDA8F6A, 0xFFFFFFFFFFFF791C), 0X25F676);
+  EXPECT_EQ(bitwise_xor_int64_int64(0x6A5B1, 0x00000), 0x6A5B1);
+

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
emkornfield commented on pull request #7965:
URL: https://github.com/apache/arrow/pull/7965#issuecomment-691811519


   +1 thank you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kiszk commented on pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
kiszk commented on pull request #7965:
URL: https://github.com/apache/arrow/pull/7965#issuecomment-674392674


   Looks good to me


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on a change in pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
emkornfield commented on a change in pull request #7965:
URL: https://github.com/apache/arrow/pull/7965#discussion_r478145554



##########
File path: cpp/src/gandiva/precompiled/arithmetic_ops_test.cc
##########
@@ -120,6 +120,14 @@ TEST(TestArithmeticOps, TestBitwiseOps) {
             0xFFFFFFFFFFFFFF7E);
   EXPECT_EQ(bitwise_or_int64_int64(0x6A5B1, 0x00000), 0x6A5B1);
 
+  // bitwise XOR
+  EXPECT_EQ(bitwise_xor_int32_int32(0x0147D, 0x17159), 0x16524);
+  EXPECT_EQ(bitwise_xor_int32_int32(0xFFFFFFCC, 0x00000297), 0XFFFFFD5B);
+  EXPECT_EQ(bitwise_xor_int32_int32(0x000, 0x285), 0x285);
+  EXPECT_EQ(bitwise_xor_int64_int64(0x563672F83, 0x0D9FCF85B), 0x5BA9BD7D8);
+  EXPECT_EQ(bitwise_xor_int64_int64(0xFFFFFFFFFFDA8F6A, 0xFFFFFFFFFFFF791C), 0X25F676);
+  EXPECT_EQ(bitwise_xor_int64_int64(0x6A5B1, 0x00000), 0x6A5B1);
+

Review comment:
       could you add a test to show xor a value with itself is zero?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield closed pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
emkornfield closed pull request #7965:
URL: https://github.com/apache/arrow/pull/7965


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7965: ARROW-9737: [C++][Gandiva] Add bitwise_xor() for integers

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7965:
URL: https://github.com/apache/arrow/pull/7965#issuecomment-674122725


   https://issues.apache.org/jira/browse/ARROW-9737


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org