[python] Support window joins in temporal alignment - #9760
Merged
JingsongLi merged 13 commits intoSep 13, 2026
Conversation
XiaoHongbo-Hope
marked this pull request as ready for review
September 13, 2026 01:29
JingsongLi
reviewed
Sep 13, 2026
JingsongLi
left a comment
Contributor
There was a problem hiding this comment.
Found three reproducible issues in window-bound handling and masked projection pruning. Verified on Python 3.13.5, PyArrow 19.0.1, and NumPy 2.4.6. The existing temporal and multimodal table tests passed (145 passed, 2 skipped because Ray is unavailable); the additional cases below expose the failures.
Contributor
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Join higher-frequency samples, such as IMU, to temporal anchor rows and aggregate each matched window.
Changes
join_windowpreceding/followingranges with configurable endpoint closuremean,min,max,first,last, andcount; the latter three also accept non-numeric valuesAPI choice
rolling().agg()aggregates windows within one input. This operation uses each left timestamp to select rows from a right input, then aggregates the matches, so it follows established window-join terminology. The verb-firstjoin_windowalso matches the publicjoin_asofAPI.Named
(source, operation)pairs allow one source column to produce multiple outputs; same-name operation strings remain shorthand.Tests
150 temporal and multimodal table tests passed on Python 3.11 / PyArrow 19, including regressions for sub-unit timestamp bounds, NumPy floating-point bounds, and preserving mask identity after pruning colliding nested aliases. The masking regressions cover mean after STRING-to-DOUBLE masking, first/last after INT-to-STRING masking, unmatched windows, and rejection of mean/min/max on masked strings. Both integer-boundary regression tests also passed on Python 3.6 / NumPy 1.19.5 / PyArrow 6.0.1. An additional 2,400 boundary cases passed on each of NumPy 1.19.5 and 2.2.6. Python 3.6 syntax and flake8 checks passed.
The masked-alias regressions cannot complete on PyArrow 6 because the existing masking reader requires RecordBatch.set_column, which is unavailable in that version.