style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing whitespace removal, let-chain indentation, merged derive attributes, and unsafe block reformatting. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
@@ -100,7 +100,8 @@ impl ArrowCompressor {
|
||||
// Simplified compression - just store array info
|
||||
let mut compressed_data = Vec::new();
|
||||
compressed_data.extend_from_slice(&array.len().to_le_bytes());
|
||||
compressed_data.extend_from_slice(&(std::ptr::from_ref(array.data_type()) as usize).to_le_bytes());
|
||||
compressed_data
|
||||
.extend_from_slice(&(std::ptr::from_ref(array.data_type()) as usize).to_le_bytes());
|
||||
|
||||
Ok(CompressedArrowArray {
|
||||
compressed_data,
|
||||
@@ -257,7 +258,11 @@ impl StreamingCompressor {
|
||||
pub fn finalize(self) -> Result<CompressedStream> {
|
||||
let metadata = StreamMetadata {
|
||||
num_batches: self.batches.len(),
|
||||
total_rows: self.batches.iter().map(arrow::array::RecordBatch::num_rows).sum(),
|
||||
total_rows: self
|
||||
.batches
|
||||
.iter()
|
||||
.map(arrow::array::RecordBatch::num_rows)
|
||||
.sum(),
|
||||
compression_ratio: 3.5, // Placeholder
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user