Skip to content

Parquet: Override variant() in ParquetAvroWriter.WriteBuilder to prevent null writer/NPE #15933

@manuzhang

Description

@manuzhang

Feature Request / Improvement

ParquetAvroWriter.WriteBuilder does not override variant(...), so it inherits the default implementation from ParquetTypeVisitor, which returns null.

During struct writer construction, that null field writer is wrapped with ParquetValueWriters.option(...) for OPTIONAL fields, and OptionWriter dereferences writer.columns(), causing a NullPointerException during writer construction.

Although being only used in tests, ParquetAvroWriter is still a public API, so it would be nice to fix the NPE.

Query engine

None

Willingness to contribute

  • I can contribute this improvement/feature independently
  • I would be willing to contribute this improvement/feature with guidance from the Iceberg community
  • I cannot contribute this improvement/feature at this time

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions