viirya commented on code in PR #3325:
URL: https://github.com/apache/arrow-rs/pull/3325#discussion_r1046241058


##########
parquet/src/bloom_filter/mod.rs:
##########
@@ -195,17 +196,69 @@ impl Sbbf {
     fn write_bitset<W: Write>(&self, mut writer: W) -> Result<(), 
ParquetError> {
         for block in &self.0 {
             for word in block {
-                writer.write_all(&word.to_le_bytes()).map_err(|e| {
-                    ParquetError::General(format!(
-                        "Could not write bloom filter bit set: {}",
-                        e
-                    ))
-                })?;
+                let pointer: *const u8 = (word as *const u32) as *const _;
+                let bytes: &[u8] =
+                    unsafe { slice::from_raw_parts(pointer, 
mem::size_of::<u32>()) };
+                if cfg!(target_endian = "big") {
+                    Self::write_all_for_big_endian(&mut writer, bytes)?;

Review Comment:
   okay



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