joinAsofFrames

fnDataFrame joinAsofFrames(DataFrame left, DataFrame right, string leftOn, string rightOn, AsofDirection direction = AsofDirection.BACKWARD, long tolerance = long.max)

The sorted asof join (ADR-2026-10-30-03): for each left row (in order, at most one right row), BACKWARD takes the last right row with rightKey <= leftKey, FORWARD the first with `>=`, NEAREST the smaller distance with exact ties toward BACKWARD. Duplicate right keys at the chosen position: BACKWARD the last duplicate, FORWARD the first. Tolerance is inclusive (|leftKey - matchKey| <= tolerance, key units); the default is unbounded. Both sides must already be sorted ascending by the key (non-decreasing over the valid values) - validated, never sorted silently. Left null keys stay null-padded; right null rows never match. The key dtypes must be the same ordered kind (the temporal kinds and the numerics).

Parameters

leftthe left frame
rightthe right frame
leftOnthe left key column
rightOnthe right key column
directionthe match direction
tolerancethe inclusive maximum distance (key units)

Returns

every left row with its matched right columns (nulls

where unmatched).

Throws

DataFrameException on missing columns, kind violations,

unsorted input or an out-of-range tolerance.