waynexia commented on code in PR #5299:
URL: https://github.com/apache/arrow-rs/pull/5299#discussion_r1461599614
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -119,11 +119,27 @@ impl<W: Write + Send> ArrowWriter<W> {
writer: W,
arrow_schema: SchemaRef,
props: Option<WriterProperties>,
+ ) -> Result<Self> {
+ Self::try_new_with_options(writer, arrow_schema, props,
Default::default())
+ }
+
+ /// Try to create a new Arrow writer with [`ArrowWriterOptions`].
+ ///
+ /// The writer will fail if:
+ /// * a `SerializedFileWriter` cannot be created from the ParquetWriter
+ /// * the Arrow schema contains unsupported datatypes such as Unions
+ pub fn try_new_with_options(
+ writer: W,
+ arrow_schema: SchemaRef,
+ props: Option<WriterProperties>,
Review Comment:
>I do think we should probably move WriterProperties on to ArrowWriterOptions
This approach looks good to me. And we can also consider deprecating the old
`try_new` method or making a breaking change to remove it, since these two are
very similar
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]