The writer always iterates through all BaseWriters, and an array of 128 BaseWriters is allocated. So if you do not have 128 typeIds and do not touch all of them, setPosition will give you an exception.
Reporter: David Li / @lidavidm
Note: This issue was originally created as ARROW-8665. Please see the migration documentation for further details.