You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/05/24 19:47:22 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #4268: Derive Default for WriterProperties

alamb commented on code in PR #4268:
URL: https://github.com/apache/arrow-rs/pull/4268#discussion_r1204683595


##########
parquet/src/file/properties.rs:
##########
@@ -27,7 +27,7 @@
 //! };
 //!
 //! // Create properties with default configuration.
-//! let props = WriterProperties::builder().build();
+//! let props = WriterProperties::default();

Review Comment:
   ```suggestion
   //! let props = WriterProperties::new();
   ```
   
   See suggestion below



##########
parquet/src/file/properties.rs:
##########
@@ -130,6 +130,12 @@ pub struct WriterProperties {
     sorting_columns: Option<Vec<SortingColumn>>,
 }
 
+impl Default for WriterProperties {
+    fn default() -> Self {
+        Self::builder().build()
+    }
+}
+
 impl WriterProperties {

Review Comment:
   Can I also request `WriterProperties::new()` that does the same thing?
   
   I think `X::new()` I think is the canonical way to construct new objects in Rust and will be the easiest for new Rust users to discover



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org