Skip to content

table: preserve integer precision in numeric filters - #446

Open
dailyun wants to merge 1 commit into
jedib0t:mainfrom
dailyun:codex/exact-integer-filters
Open

dailyun wants to merge 1 commit into
jedib0t:mainfrom
dailyun:codex/exact-integer-filters

Conversation

@dailyun

@dailyun dailyun commented Nov 3, 2026

Copy link
Copy Markdown

Proposed Changes

  • Preserve integer precision in numeric table filters. Adjacent int64 values above 2^53 currently compare equal after float64 conversion, so GreaterThan drops a row it should keep.
  • Keep the existing fast float comparison below the exact-integer boundary; for large integer inputs, compare decimal integers exactly before applying the ordering predicate. Decimal, exponent, infinity, NaN, and invalid-input handling retain the existing float path. Equality and string operators are unchanged.
  • Add 20 regressions covering all four ordering operators with positive/negative int64, int64/uint64 limits, and numeric strings, plus nine compatibility cases.

Fixes #445.

Validation:

  • The 20 integer regression cases fail on unchanged main.
  • make test-no-lint passes, including formatting, vet, complexity checks, and tests; list/progress/table/text each retain 100% statement coverage.
  • Full go test -race ./... passes on macOS arm64 Go 1.27.3 and Linux arm64 Go 1.18.10 (the module/CI floor).
  • golangci-lint 2.15.0 reports seven existing findings in unchanged files; the identical seven reproduce on a clean checkout of base 9a59d895c26f170f10b0c16a5326c6e43c045fdc. The repository CI's pinned 2.7.2 was not run locally.
  • git diff --check passes.

OpenAI Codex assisted with the implementation and validation.

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41593517252

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 9 of 9 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 5173
Covered Lines: 5173
Line Coverage: 100.0%
Coverage Strength: 1.21 hits per line

💛 - Coveralls

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.

GreaterThan filter drops adjacent int64 values above 2^53

2 participants