As-of join
aj [c1…cn; t1; t2] aj0 [c1…cn; t1; t2] ajf [c1…cn; t1; t2] ajf0[c1…cn; t1; t2]
Where
t1 is a tablet2 is a simple tablec1…cn is a symbol list of column names, common to t1 and t2,
and of matching type
cn is of a sortable type (typically time)returns a table with records from the left-join of t1 and t2.
In the join, columns c1…cn-1 are matched for equality, and the last value of
cn (most recent time) is taken.
For each record in t1, the result has one record with the items in t1, and
t2, the items of the last (in row order) matching record are
appended to those of t1;
ajf, ajf0Since V3.6 2018.05.18 ajf and ajf0 behave as V2.8 aj and aj0,
i.e. they fill from LHS if RHS is null. e.g.
q)t0:([]time:2#00:00:01;sym:`a`b;p:1 1;n:`r`s)
q)t1:([]time:2#00:00:01;sym:`a`b;p:0 1)
q)t2:([]time:2#00:00:00;sym:`a`b;p:1 0N;n:`r`s)
q)t0~ajf[`sym`time;t1;t2]
1b