You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/05/08 17:20:01 UTC

[jira] [Commented] (BEAM-11742) ParquetSink fails for nullable fields

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

Beam JIRA Bot commented on BEAM-11742:
--------------------------------------

This issue is assigned but has not received an update in 30 days so it has been labeled "stale-assigned". If you are still working on the issue, please give an update and remove the label. If you are no longer working on the issue, please unassign so someone else may work on it. In 7 days the issue will be automatically unassigned.

> ParquetSink fails for nullable fields
> -------------------------------------
>
>                 Key: BEAM-11742
>                 URL: https://issues.apache.org/jira/browse/BEAM-11742
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-py-parquet
>            Reporter: Wenbing Bai
>            Assignee: Wenbing Bai
>            Priority: P2
>              Labels: stale-assigned
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Before pyarrow 0.15, it is not possible to create pyarrow record batch with schema.
> So in apache_beam.io.parquetio._ParquetSink, when creating pyarrow record batch we use 
>  
> {code:java}
> rb = pa.RecordBatch.from_arrays(arrays, self._schema.names){code}
> Error is raised that the parquet table to be created (record batch schema) has a different schema with the schema specify (self._schema).
> For example, when schema specified with "is not null", the record batch schema doesn't indicate that, the error will be raised.
>  
> The fix is to use schema instead of names in pa.RecordBatch.from_arrays
> {code:java}
> rb = pa.RecordBatch.from_arrays(arrays, schema=self._schema){code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)