[ 
https://issues.apache.org/jira/browse/PARQUET-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17312429#comment-17312429
 ] 

ASF GitHub Bot commented on PARQUET-2012:
-----------------------------------------

dossett commented on a change in pull request #886:
URL: https://github.com/apache/parquet-mr/pull/886#discussion_r604951366



##########
File path: 
parquet-protobuf/src/test/java/org/apache/parquet/proto/TestUtils.java
##########
@@ -198,14 +197,11 @@ private static void 
checkSameBuilderInstance(MessageOrBuilder[] messages) {
    * Writes messages to temporary file and returns its path.
    */
   public static Path writeMessages(MessageOrBuilder... records) throws 
IOException {
-    return writeMessages(inferRecordsClass(records), records);
-  }
-
-  public static Path writeMessages(Class<? extends Message> cls, 
MessageOrBuilder... records) throws IOException {
     Path file = someTemporaryFilePath();
+    Class<? extends Message> cls = inferRecordsClass(records);
 
-    ProtoParquetWriter<MessageOrBuilder> writer =
-            new ProtoParquetWriter<MessageOrBuilder>(file, cls);
+    ParquetWriter<MessageOrBuilder> writer =
+      
ProtoParquetWriter.<MessageOrBuilder>builder(file).withMessage(cls).build();

Review comment:
       This change just switches the only internal use of the deprecated 
constructors to use the `builder` pattern, and does some other minor cleanup 
with these methods.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


> ProtoParquetWriter constructors should be updated
> -------------------------------------------------
>
>                 Key: PARQUET-2012
>                 URL: https://issues.apache.org/jira/browse/PARQUET-2012
>             Project: Parquet
>          Issue Type: Improvement
>          Components: parquet-protobuf
>    Affects Versions: 1.12.0
>            Reporter: Aaron Blake Niskode-Dossett
>            Assignee: Aaron Blake Niskode-Dossett
>            Priority: Minor
>
> The constructors should be marked as deprecated and internal uses of them 
> switched to the Builder pattern



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to