From 7a8e6d1a388a048e83f20083422fa5cb6013fc8b Mon Sep 17 00:00:00 2001 From: Dom Dwyer <dom@itsallbroken.com> Date: Wed, 18 May 2022 16:45:15 +0100 Subject: [PATCH] refactor: remove unused max_row_group_size The Parquet writer references an unused max_row_group_size property in the parquet file metadata. --- parquet_file/src/storage.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/parquet_file/src/storage.rs b/parquet_file/src/storage.rs index c4085683f8..13a1f292df 100644 --- a/parquet_file/src/storage.rs +++ b/parquet_file/src/storage.rs @@ -87,22 +87,11 @@ pub type Result<T, E = Error> = std::result::Result<T, E>; #[derive(Debug, Clone)] pub struct Storage { object_store: Arc<DynObjectStore>, - - // If `Some`, restricts the size of the row groups created in the parquet file - max_row_group_size: Option<usize>, } impl Storage { pub fn new(object_store: Arc<DynObjectStore>) -> Self { - Self { - object_store, - max_row_group_size: None, - } - } - - /// Specify the maximum sized row group to make - pub fn set_max_row_group_size(&mut self, max_row_group_size: usize) { - self.max_row_group_size = Some(max_row_group_size); + Self { object_store } } fn writer_props(&self, metadata_bytes: &[u8]) -> WriterProperties { @@ -113,12 +102,6 @@ impl Storage { }])) .set_compression(Compression::ZSTD); - let builder = if let Some(max_row_group_size) = self.max_row_group_size.as_ref() { - builder.set_max_row_group_size(*max_row_group_size) - } else { - builder - }; - builder.build() }