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

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

lukasnalezenec commented on issue #473: PARQUET-1292 Adding constructors to 
ProtoParquetWriter with writeSpecsCompliant flag
URL: https://github.com/apache/parquet-mr/pull/473#issuecomment-390241161
 
 
   I think that problem is that there was no ProtoParquetWriter constructor 
with conf parameter.
   I would recommend adding the conf parameter and not writeSpecsCompliant 
parameter. 
   AFAIK there is no elegant solution how we can accept writeSpecsCompliant 
parameter, set its value to configuration and pass it super constructor.
   (see getConfigWithWriteSpecsCompliant())
   
   
   I would take existing constructors and add those two new constructors:
   
   ```
   ProtoParquetWriter(Path file, Class<? extends Message> protoMessage, 
Configuration conf);
   
   ProtoParquetWriter(Path file, Class<? extends Message> protoMessage, 
ParquetFileWriter.Mode mode, CompressionCodecName compressionCodecName, int 
blockSize, int pageSize, int dictionaryPageSize, boolean enableDictionary, 
boolean validating, WriterVersion writerVersion, Configuration conf
   ```
   We might also extend some other existing constructors with conf parameter. 
(I am not sure if it is necessary)
   
   After this change we might turn on the parameter like this:
   
   ```java
   Configuration conf = new Configuration();
   ProtoWriteSupport.setWriteSpecsCompliant(conf, true);
   
   ParquetWriter<MyMessage> writer  = new ProtoParquetWriter<>(file, cls, 
conf);`
   ```
   
   If you disagree with me, I'm open to another solution. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add constructors to ProtoParquetWriter to write specs compliant Parquet
> -----------------------------------------------------------------------
>
>                 Key: PARQUET-1292
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1292
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: Kunal Chawla
>            Assignee: Kunal Chawla
>            Priority: Minor
>             Fix For: 1.11.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to