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

yugu commented on PARQUET-1047:
-------------------------------

So in our case we were trying to preserve only the header information of the 
data ('cause we have a read_meta function) in case the data is empty.
Either way, seems the function is not particularly required by majority... 
I've wrote a work around and put in one row of null values when the data table 
is empty..

> Anyway to write empty row group?
> --------------------------------
>
>                 Key: PARQUET-1047
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1047
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-cpp
>    Affects Versions: cpp-1.1.0
>            Reporter: yugu
>
> [Error]
> So I'm trying to write only header information (column names and such).
> {code:java}
> parquet::RowGroupWriter* rg_writer =
>                 file_writer->AppendRowGroup(0);
> for (i = 0; i < Cols; i++){
> parquet::BoolWriter* writer = 
> static_cast<parquet::BoolWriter*>(rg_writer->NextColumn());
> writer->WriteBatch(0, nullptr, nullptr, nullptr);
> }
> {code}
> The problem is that when trying to close the file_writer, the program throws:
> {code:java}
> Parquet what error: Parquet Write error: Column 3 is not complete.
> {code}
> [Possbility]
> I know this is possible because as per [this 
> post|https://issues.apache.org/jira/browse/PARQUET-104?jql=project%20%3D%20PARQUET%20AND%20text%20~%20%22empty%22]
>  an empty row group was written to the back.
> Tho the problem was present in parquet-mr instead of parquet-cpp, I guess 
> it's fair to expect some feature like that.
> Or maybe I don't fully understand how the system works.... would be great if 
> you guys can point out where to look it : D



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to