Skip to content

JsonFileWriter fails with NPE after VectorSchemaRoot syncSchema #390

Open

Description

@asfimport

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 / @jarohen

Note: This issue was originally created as ARROW-11385. Please see the migration documentation for further details.

Activity

  1. transferred this issue fromapache/arrowon Nov 27, 2024
  2. hutiefang76 commented on Oct 24, 2026

    @hutiefang76
    Contributor

    I can take this. The current syncSchema() still leaves the Field-keyed lookup using the old schema. I'll refresh that lookup when the schema changes and add regressions for child-type promotion and a real JSON write/read round trip, while preserving the existing vector objects and row count.

    I've checked the related add/remove ownership and name-lookup PRs; they do not cover this cache refresh. I'll keep this change scoped to schema synchronization and its tests.

    AI-generated coordination comment; investigation and implementation assisted by Codex and DeepSeek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions