Skip to content

[python] handle large integer literals and signed zeros in Arrow filters. - #11554

Draft
fengruotj wants to merge 1 commit into
apache:masterfrom
fengruotj:fix/large-integer-literals
Draft

fengruotj wants to merge 1 commit into
apache:masterfrom
fengruotj:fix/large-integer-literals

Conversation

@fengruotj

@fengruotj fengruotj commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Close #11553

Fix two inconsistencies between the Python reader's Arrow and scalar filtering paths:

  • Integer predicates containing literals outside the int64 range, such as n < 9223372036854775808, raise OverflowError during Arrow expression construction.
  • Floating-point IN and NOT IN distinguish -0.0 from +0.0 in Arrow, producing different results from Python scalar evaluation.

Tests

Added regression coverage for integer boundaries, signed zeros, mixed numeric literals, NULLs, compound SDK/SQL predicates, projected reads, and system-table filtering. Batch-reader tests also verify that these predicates do not fall back to row-by-row evaluation.

  • Python 3.13.2 / PyArrow 22.0.0: 446 tests passed across seven related test files.
  • Python 3.6.15 / PyArrow 6.0.1: all 94 new regression cases passed.
  • Verified large-integer filtering against a real $snapshots system table on both Arrow versions.
  • Flake8 and git diff --check passed.

The broader PyArrow 6 run had 380 passing tests and 66 failures. All 66 failures also occur on the parent revision; no new failures were introduced.

@fengruotj fengruotj changed the title [python] handle large integer literals and signed zeros in Arrow fil… [python] handle large integer literals and signed zeros in Arrow filters. Nov 30, 2026
@fengruotj
fengruotj force-pushed the fix/large-integer-literals branch from 8c96836 to 0924089 Compare November 30, 2026 09:57
@fengruotj
fengruotj marked this pull request as draft November 30, 2026 12:28
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.

[Bug] PyPaimon numeric filters overflow on large integer literals and return inconsistent results for signed zeros

1 participant