Skip to content

Commit 93278ee

Browse files
committed
refactor(11770): provide deprecation warning for TryFrom
1 parent 7a6a276 commit 93278ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

datafusion/common/src/file_options/parquet_writer.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ impl ParquetWriterOptions {
5959
}
6060

6161
impl TableParquetOptions {
62+
#[deprecated(
63+
since = "44.0.0",
64+
note = "Please use `TableParquetOptions::into_writer_properties_builder` and `TableParquetOptions::into_writer_properties_builder_with_arrow_schema`"
65+
)]
66+
pub fn try_from(&self) -> Result<ParquetWriterOptions> {
67+
// ParquetWriterOptions will have defaults for the remaining fields (e.g. sorting_columns)
68+
Ok(ParquetWriterOptions {
69+
writer_options: self.into_writer_properties_builder()?.build(),
70+
})
71+
}
72+
6273
/// Convert the session's [`TableParquetOptions`] into a single write action's [`WriterPropertiesBuilder`].
6374
///
6475
/// The returned [`WriterPropertiesBuilder`] includes customizations applicable per column.

0 commit comments

Comments
 (0)