HippoBaro commented on code in PR #11971:
URL: https://github.com/apache/arrow-rs/pull/11971#discussion_r4419043277
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -1386,29 +1455,68 @@ impl ArrowRowGroupWriter {
/// Factory that creates new column writers for each row group in the Parquet
file.
///
-/// You can create this structure via an
[`ArrowWriter::into_serialized_writer`].
+/// Create this structure with [`Self::try_new`] or
[`ArrowWriter::into_serialized_writer`].
/// See the example on [`ArrowColumnWriter`] for how to encode columns in
parallel
#[derive(Debug)]
pub struct ArrowRowGroupWriterFactory {
- schema: SchemaDescPtr,
- arrow_schema: SchemaRef,
+ // Only deprecated `new` can store an Err; `try_new` always stores an Ok.
+ // TODO(61.0.0): When removing `new`, store Arc<ArrowWriteSchemaPlan>
directly,
+ // remove ArrowWriteSchemaPlanError and schema_plan(), and simplify
+ // from_schema_plan to accept the plan without a Result.
+ schema_plan: std::result::Result<Arc<ArrowWriteSchemaPlan>,
ArrowWriteSchemaPlanError>,
props: WriterPropertiesPtr,
page_store_factory: Arc<dyn PageStoreFactory>,
#[cfg(feature = "encryption")]
file_encryptor: Option<Arc<FileEncryptor>>,
}
impl ArrowRowGroupWriterFactory {
- /// Create a new [`ArrowRowGroupWriterFactory`] for the provided file
writer and Arrow schema
+ /// Create a new [`ArrowRowGroupWriterFactory`] for the provided file
writer and Arrow schema.
+ ///
+ /// Schema-planning errors are deferred until
[`Self::create_column_writers`] is called.
+ /// Use [`Self::try_new`] to return these errors during construction
instead.
+ #[deprecated(
+ since = "60.1.0",
Review Comment:
Thanks! It's in 🙇
--
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]