[python] Support window joins in temporal alignment - #9760
Open
XiaoHongbo-Hope wants to merge 12 commits into
Open
[python] Support window joins in temporal alignment#9760XiaoHongbo-Hope wants to merge 12 commits into
XiaoHongbo-Hope wants to merge 12 commits into
Conversation
XiaoHongbo-Hope
marked this pull request as ready for review
September 13, 2026 01:29
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
147 temporal and multimodal table tests passed on Python 3.11 / PyArrow 19, including regressions for preserving masked field types after pruning colliding projection aliases. The 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.