Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parquet/src/arrow/arrow_writer/byte_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::encodings::encoding::{DeltaBitPackEncoder, Encoder};
use crate::encodings::rle::RleEncoder;
use crate::errors::{ParquetError, Result};
use crate::file::properties::{EnabledStatistics, WriterProperties, WriterVersion};
use crate::geospatial::accumulator::{try_new_geo_stats_accumulator, GeoStatsAccumulator};
use crate::geospatial::accumulator::{GeoStatsAccumulator, try_new_geo_stats_accumulator};
use crate::geospatial::statistics::GeospatialStatistics;
use crate::schema::types::ColumnDescPtr;
use crate::util::bit_util::num_required_bits;
Expand Down
13 changes: 6 additions & 7 deletions parquet/src/arrow/arrow_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4161,13 +4161,12 @@ mod tests {
true,
)]));
let parquet_schema = Type::group_type_builder("root")
.with_fields(vec![Type::primitive_type_builder(
"integers",
crate::basic::Type::INT64,
)
.build()
.unwrap()
.into()])
.with_fields(vec![
Type::primitive_type_builder("integers", crate::basic::Type::INT64)
.build()
.unwrap()
.into(),
])
.build()
.unwrap();
let parquet_schema_descr = SchemaDescriptor::new(parquet_schema.into());
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/column/writer/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::data_type::private::ParquetValueType;
use crate::encodings::encoding::{DictEncoder, Encoder, get_encoder};
use crate::errors::{ParquetError, Result};
use crate::file::properties::{EnabledStatistics, WriterProperties};
use crate::geospatial::accumulator::{try_new_geo_stats_accumulator, GeoStatsAccumulator};
use crate::geospatial::accumulator::{GeoStatsAccumulator, try_new_geo_stats_accumulator};
use crate::geospatial::statistics::GeospatialStatistics;
use crate::schema::types::{ColumnDescPtr, ColumnDescriptor};

Expand Down
10 changes: 6 additions & 4 deletions parquet/src/geospatial/accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,12 @@ mod test {

// We should not be able to initialize a global accumulator after we've initialized at least
// one accumulator
assert!(init_geo_stats_accumulator_factory(Arc::new(
DefaultGeoStatsAccumulatorFactory::default()
))
.is_err())
assert!(
init_geo_stats_accumulator_factory(Arc::new(
DefaultGeoStatsAccumulatorFactory::default()
))
.is_err()
)
}

#[cfg(feature = "geospatial")]
Expand Down
19 changes: 9 additions & 10 deletions parquet/tests/geospatial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ mod test {

use std::{iter::zip, sync::Arc};

use arrow_array::{create_array, ArrayRef, BinaryArray, RecordBatch};
use arrow_array::{ArrayRef, BinaryArray, RecordBatch, create_array};
use arrow_schema::{DataType, Field, Schema};
use bytes::Bytes;
use parquet::{
arrow::{arrow_writer::ArrowWriterOptions, ArrowWriter},
arrow::{ArrowWriter, arrow_writer::ArrowWriterOptions},
column::reader::ColumnReader,
data_type::{ByteArray, ByteArrayType},
file::{
Expand Down Expand Up @@ -415,14 +415,13 @@ mod test {

fn parquet_schema_geometry() -> Type {
Type::group_type_builder("root")
.with_fields(vec![Type::primitive_type_builder(
"geo",
parquet::basic::Type::BYTE_ARRAY,
)
.with_logical_type(Some(LogicalType::Geometry { crs: None }))
.build()
.unwrap()
.into()])
.with_fields(vec![
Type::primitive_type_builder("geo", parquet::basic::Type::BYTE_ARRAY)
.with_logical_type(Some(LogicalType::Geometry { crs: None }))
.build()
.unwrap()
.into(),
])
.build()
.unwrap()
}
Expand Down
Loading