apache / apache/parquet-java

AvroParquetWriter can't save object who can have link to object of same type

Open
#1,642 9 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

When i try to write instance of UserTestOne created from following schema

{"namespace": "com.example.avro",
"type": "record",
"name": "UserTestOne",
"fields": [{"name": "name", "type": "string"}, {"name": "friend", "type": ["null", "UserTestOne"], "default":null} ]
}

I get java.lang.StackOverflowError

**Environment**: parquet version 1.5.0
**Reporter**: [Dmitriy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dimaga) / @dimaga

**Note**: *This issue was originally created as [PARQUET-129](https://issues.apache.org/jira/browse/PARQUET-129). 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

The issue provides a recursive UserTestOne schema and reports a StackOverflowError from AvroParquetWriter. Start by reproducing the failure with the shown schema and a UserTestOne instance, then trace the writer's recursive-schema handling. Done means the recursive object can be written without overflowing the stack and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.