Maybe Ryan or Tom can help

On Wed, Mar 18, 2015 at 4:59 PM, Wei Yan <[email protected]> wrote:

> Hi, devs,
>
>
> I’m a newbie of using parquet. I met a ParquetWriter problem and wish
> anyone can help me.
>
>
> I use ParquetWriter to write a GenericRecord to a file. And the schema
> used to define the ParquetWriter has fewer fields than the GenericRecord.
> e.g., The schema for the ParquetWriter:
> {"type":"record","name":"r","fields":[{"name":"f1","type":"double","default":0}]}
> , which only has one field "f1”. And the GenericRecord has two fields:
> {"f2": null, "“"f1": 1.0}.
>
>
> When I use that ParquetWriter to write that record, I thought it would
> only write field “f1” and skip “f2”. However, I got this exception
> “Null-value for required field: f1”. It looks like the ParquetWriter
> considered the field sequence, and tried to match the “f2” in the record to
> the “f1” to the schema. Is this by design?
>
>
> Very appreciate for any help.
>
>
> thanks,
> Wei
>

Reply via email to