akverma00 commented on code in PR #886:
URL: https://github.com/apache/parquet-java/pull/886#discussion_r1736841981


##########
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:
   @dossett 
   The purpose was to create ProtoParquetWriter object. Here the return type is 
itself changed to the parent class type.
   If I want to create the "ProtoParquetWriter" type of object, it is not 
possible using builder pattern, I have to use the deprecated constructor itself 
as of now.
   
   Can you explain why was this done? 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to