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

Julien Le Dem commented on DRILL-3972:
--------------------------------------

Thanks [~andrew.musselman]
I think you should start by looking at [ParquetWriterBatchCreator 
here|https://github.com/apache/drill/blob/b4d47c56b6484eedbf3f44516338da4cdbfbb7b4/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetWriterBatchCreator.java#L35]
It needs to return a CloseableRecordBatch which is the class that gets the 
record batches in Columns.
Currently it returns a 
[WriterRecordBatch|https://github.com/apache/drill/blob/b4d47c56b6484eedbf3f44516338da4cdbfbb7b4/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java#L158]
 which writes records one row at a time to a RecordWriter.
{noformat}return new WriterRecordBatch(writer, incoming, context, 
getRecordWriter(context, writer));{noformat}
WriterRecordBatch is the common class to write to a row oriented format.
But in this case we'd want to directly convert the columns and not go through a 
row representation in between


> Vectorize Parquet Writer
> ------------------------
>
>                 Key: DRILL-3972
>                 URL: https://issues.apache.org/jira/browse/DRILL-3972
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Parquet
>            Reporter: Julien Le Dem
>              Labels: pick-me-up
>
> Currently the 
> [ParquetRecordWriter|https://github.com/apache/drill/blob/a98da39dd5a8fa368afd8765f4e981826bbfcc0f/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java]
>  receives one record at a time and then turns that into columns.
> Which means we convert from Drill columns to rows and then to Parquet columns.
> Instead we could directly convert the Drill columns into Parquet columns in a 
> vectorized manner.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to