kou commented on code in PR #48166:
URL: https://github.com/apache/arrow/pull/48166#discussion_r2543973231


##########
cpp/src/arrow/ipc/message_internal_test.cc:
##########
@@ -74,6 +76,29 @@ TEST(TestMessageInternal, TestByteIdentical) {
       0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x66, 0x30, 0x00, 0x00, 
0x08, 0x00,
       0x0C, 0x00, 0x08, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x01,
       0x40, 0x00, 0x00, 0x00};
+#else
+  // On Big-endian systems, 4 bytes are appended to indicate it as a BE 
system. Hence the
+  // total size is 4 bytes more than the LE systems.

Review Comment:
   It seems that https://arrow.apache.org/docs/format/Columnar.html doesn't 
mention the 4 bytes for endianness. Could you share a document URL that 
mentions the 4 bytes?



##########
cpp/src/arrow/acero/hash_join.cc:
##########
@@ -306,12 +307,33 @@ class HashJoinBasicImpl : public HashJoinImpl {
 
     size_t num_probed_rows = match.size() + no_match.size();
     if (mask.is_scalar()) {
-      const auto& mask_scalar = mask.scalar_as<BooleanScalar>();
-      if (mask_scalar.is_valid && mask_scalar.value) {
-        // All rows passed, nothing left to do
-        return Status::OK();
+#if ARROW_LITTLE_ENDIAN
+       const auto& mask_scalar = mask.scalar_as<BooleanScalar>();
+       if (mask_scalar.is_valid && mask_scalar.value) {
+         // All rows passed, nothing left to do
+         return Status::OK();
+#else
+      // Check if the scalar is a BooleanScalar before casting
+      if (mask.scalar()->type->id() == Type::BOOL) {

Review Comment:
   Why do we need this check? This check didn't exist in the existing code.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to