Skip to content

DateTimePartsEncodingDecoder: dead validity-intersect branches for seconds/subseconds #251

Description

@dfa1

Context

The spec (encoding-format/misc.md, vortex.datetimeparts) says validity delegates to the days child only — seconds and subseconds are always non-nullable.

DateTimePartsEncodingDecoder.java:70-82 intersects the validity of all three children. Because seconds and subseconds are decoded as non-nullable, they can never surface as MaskedArray, so the two extra instanceof MaskedArray checks are dead and the result is always equivalent to days-only delegation (matching the spec).

IntelliJ confirms: WEAK WARNING Value 'validity' is always 'null' at line 72 — the seconds branch never fires.

Fix

Drop the dead seconds/subseconds intersect branches. Keep only the days check. Update the comment from "a row is null when ANY component is null" to "delegates to days child per spec" — the current comment is inaccurate.

Reference

Spec: https://github.com/vortex-data/vortex/blob/mp/spec/docs/specification/encoding-format/misc.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions