You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Spark] Tidy ArrowFieldWriter: generic vector field and a single place that advances count #14
ArrowFieldWriter (PR #7) has two small structural issues worth tidying. Neither is a bug today.
1. Each subclass copies the base vector field
17 subclasses keep a second, typed copy of the base vector (bits, bytes, shorts, ...), each with a constructor that only sets it.
Fix: make the base class generic, ArrowFieldWriter<V extends FieldVector> with a final V vector, and drop the copies.
2. count is advanced in two places
write() increments count, but StructWriter.setNull also increments each child's count by hand. A future writer that forgets this misaligns the struct's children with no error.
Fix: a writeNull() helper that calls setNull() and then count++, used for nulled struct children.
Activity