Skip to content

Commit

Permalink
fix: tiny typo in AggregatedStats (#1516)
Browse files Browse the repository at this point in the history
# Description
This PR fix typo in AggregatedStats.

# Related Issue(s)
- closes #1515 

# Documentation
  • Loading branch information
haruband authored Jul 6, 2023
1 parent 56dfd25 commit 6c47273
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rust/src/writer/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl AddAssign for AggregatedStats {
}
(lhs, rhs) => lhs.or(rhs),
};
self.max = match (self.min.take(), rhs.max) {
self.max = match (self.max.take(), rhs.max) {
(Some(lhs), Some(rhs)) => {
if lhs > rhs {
Some(lhs)
Expand Down Expand Up @@ -486,6 +486,7 @@ mod tests {
use lazy_static::lazy_static;
use parquet::data_type::{ByteArray, FixedLenByteArray};
use parquet::file::statistics::ValueStatistics;
use parquet::{basic::Compression, file::properties::WriterProperties};
use serde_json::{json, Value};
use std::collections::HashMap;
use std::path::Path;
Expand Down Expand Up @@ -642,6 +643,12 @@ mod tests {
.unwrap();

let mut writer = RecordBatchWriter::for_table(&table).unwrap();
writer = writer.with_writer_properties(
WriterProperties::builder()
.set_compression(Compression::SNAPPY)
.set_max_row_group_size(128)
.build(),
);

let arrow_schema = writer.arrow_schema();
let batch = record_batch_from_message(arrow_schema, JSON_ROWS.clone().as_ref()).unwrap();
Expand Down

0 comments on commit 6c47273

Please sign in to comment.