Skip to content

fix(table): preserve null equality-delete keys#1327

Closed
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/equality-delete-null-encoders
Closed

fix(table): preserve null equality-delete keys#1327
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/equality-delete-null-encoders

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • add null checks to the specialized equality-delete encoders for numeric, date, time, and timestamp Arrow columns
  • keep the fast paths, but make their null encoding match the generic encoder exactly
  • add focused regression coverage that specialized and generic encoders produce identical bytes for null and non-null rows across the affected types

Why

The optimized equality-delete encoder paths for numeric, date, time, and timestamp columns wrote a non-null tag and raw value without checking IsNull(row). That could make null delete keys collide with zero or default values, or encode differently from the generic path used elsewhere.

This change keeps the optimized encoders but makes their null handling match encodeArrowValue so equality-delete key encoding stays stable and correct.

Testing

  • go test ./table -run 'Test(ReadAllEqualityDeleteFilesRejectsEmptyEqualityFieldIDs|MakeColEncoderMatchesGenericEncodingForNullSpecializedTypes)$' -count=1
  • go test ./table -count=1
  • go test ./... -run '^$' -count=1
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run --timeout=10m ./table/...
  • git diff --check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant