apache / apache/parquet-java

ParquetProperties should not use static ValuesWriterFactory

Open
#2,174 0 comments 0 reactions 0 assignees View on GitHub
Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

`ParquetProperties` by default is initialized with static `ValuesWriterFactory`, but during `ParquetProperties` construction `ValuesWriterFactory` is initialized with property. It means that if I construct two `ParquetProperties` with different properties (for example allocators), both will reference a static `ValuesWriterFactory` that would be initialized with the latest `ParquetProperties`. The same problem applies to `DefaultValuesWriterFactory`.

**Reporter**: [Vlad Rozov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vrozov) / @vrozov
#### Related issues:
- [Add support in Parquet to configure the encoding used by ValueWriters](https://github.com/apache/parquet-java/issues/1966) (is caused by)

**Note**: *This issue was originally created as [PARQUET-1302](https://issues.apache.org/jira/browse/PARQUET-1302). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting ParquetProperties, ValuesWriterFactory, and DefaultValuesWriterFactory to trace how factories are initialized during construction. Reproduce the issue by constructing two ParquetProperties instances with different properties, such as allocators, and verify that each uses its own configuration rather than the latest one globally. Done means the instances no longer share incorrectly initialized factory state.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.