zenfenan commented on issue #11474: FLINK-10114: Add ORC BulkWriter support for 
StreamingFileSink
URL: https://github.com/apache/flink/pull/11474#issuecomment-612393911
 
 
   @kl0u On the Vectorizer improvement, I believe we cannot have the 
addUserMetadata() in Vectorizer class because it needs the `setWriter(Writer 
writer)` with a writer to be called but the `Writer` is only instantiated 
inside the OrcBulkWriterFactory so I am suggesting that we update 
`OrcBulkWriterFactory` to take an optional method, say 
`withUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)` and pass this 
to the OrcBulkWriter. In OrcBulkWriter's flush(), we can do something like:
   
   ```
   @Override
   public void flush() {
       if (this.userMetadata != null) {
           this.writer.appendUserMetadata(this.userMetadata);
       }
   }
   ```
   
   Thoughts?

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


With regards,
Apache Git Services

Reply via email to