From 6357ae45037f7dc0ea583f41f322c92c8edbaf02 Mon Sep 17 00:00:00 2001 From: glfeng Date: Mon, 11 Nov 2024 14:01:20 +0800 Subject: [PATCH 1/2] Add file_extension for specify file_extension of ParquetReadOptions --- datafusion/core/src/datasource/file_format/options.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/datafusion/core/src/datasource/file_format/options.rs b/datafusion/core/src/datasource/file_format/options.rs index 1e0e28ef88cb..10a6688acdbe 100644 --- a/datafusion/core/src/datasource/file_format/options.rs +++ b/datafusion/core/src/datasource/file_format/options.rs @@ -262,6 +262,12 @@ impl<'a> ParquetReadOptions<'a> { Default::default() } + /// Specify file_extension + pub fn file_extension(mut self, file_extension: &'a str) -> Self { + self.file_extension = file_extension; + self + } + /// Specify parquet_pruning pub fn parquet_pruning(mut self, parquet_pruning: bool) -> Self { self.parquet_pruning = Some(parquet_pruning); From f924e8cc5aa62ecb0ae1069add1950a5a08d7914 Mon Sep 17 00:00:00 2001 From: glfeng Date: Wed, 13 Nov 2024 15:30:53 +0800 Subject: [PATCH 2/2] remove whitespace in #270 --- datafusion/core/src/datasource/file_format/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/core/src/datasource/file_format/options.rs b/datafusion/core/src/datasource/file_format/options.rs index 10a6688acdbe..e392515cacb1 100644 --- a/datafusion/core/src/datasource/file_format/options.rs +++ b/datafusion/core/src/datasource/file_format/options.rs @@ -267,7 +267,7 @@ impl<'a> ParquetReadOptions<'a> { self.file_extension = file_extension; self } - + /// Specify parquet_pruning pub fn parquet_pruning(mut self, parquet_pruning: bool) -> Self { self.parquet_pruning = Some(parquet_pruning);