v2.0.4
As-of join (:how :asof)
Inspired by q's aj. For each left row, finds the last right row where right-key <= left-key within an exact-match group. All left rows are always preserved.
;; Trade-quote matching
(join trades quotes :on [:sym :time] :how :asof)
;; Asymmetric key names
(join trades quotes :left-on [:sym :trade-time] :right-on [:sym :quote-time] :how :asof)
;; With cardinality validation
(join trades quotes :on [:sym :time] :how :asof :validate :m:1)Changes
- New
datajure.asofnamespace:asof-search,asof-indices,asof-match,build-result datajure.join::how :asofdispatch,:validatechecks right side only- 19 new tests (37 assertions), added to CI
- Fixes nil-at-midpoint bug in binary search