JsonFileWriter fails with NPE after VectorSchemaRoot syncSchema
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
Hey there :)
Repro:
- Open VSR
- Do something that'll change the `Field` of one of the vectors in the VSR (promotable writer, etc)
- `vsr.syncSchema()`
- Open JsonFileWriter, `start`, `write` -> NPE
Looks like the cause is that the `fieldVectorsMap` cache isn't updated in `syncSchema`? Possibly a few other places - `addVector`/`removeVector` too?
Cheers,
James
**Reporter**: [James Henderson](https://issues.apache.org/jira/browse/ARROW-11385) / @jarohen
**Note**: *This issue was originally created as [ARROW-11385](https://issues.apache.org/jira/browse/ARROW-11385). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Reproduce the sequence involving VectorSchemaRoot, syncSchema, and JsonFileWriter, then inspect the fieldVectorsMap cache and the addVector/removeVector paths mentioned in the report. Done means JsonFileWriter can start and write after a vector Field changes and syncSchema completes without an NPE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100