pass through date param in callendofday - #118
Merged
Merged
Conversation
DIReview Summary1 critical | 0 warning(s) | 0 suggestion(s)
|
jonathonmcmurray
approved these changes
Aug 6, 2026
ascottDI
reviewed
Aug 6, 2026
|
|
||
| / broadcast to all subscribers upon end of period, client needs to define endofperiod function | ||
| callendofperiod:{(neg getallhandles[])@\:`endofperiod`}; | ||
| callendofperiod:{(neg getallhandles[])@\:(`endofperiod;x)}; |
Contributor
There was a problem hiding this comment.
For the previous function we defined the variable, whereas, for this one we used the implicit. Would it be better to use the same format for both?
alowrydi
added a commit
that referenced
this pull request
Aug 18, 2026
TorQ's code/common/pubsub.q:19 broadcasts (`endofperiod;x;y;z) and both of
its subscribers - code/rdb/endofperiod.q and code/wdb/writedown.q:52 - are
{[currp;nextp;data]}. Ours was {(neg getallhandles[])@\:(`endofperiod;x)},
which failed two ways at once, both measured:
callendofperiod[c;n;d] -> 'rank, so a caller following that contract
could not call it at all
callendofperiod[c] -> a ternary subscriber is left PARTIALLY
APPLIED. q returns a projection, the body
never runs, and nothing throws, logs or
comes back to say so.
Same defect class as the callendofday bug fixed in #118.
callendofday deliberately stays UNARY. TorQ sends (`endofday;x;y), but the
second argument is processdata, which legacy's own rdb never reads and the
shipped .u.end alias passes ()!() for - di.rdb's endofday is unary to
match. Fixing it "for symmetry" would projection-ise every unary
subscriber, so the asymmetry is documented in pubsub.md rather than left
looking like an oversight.
15 regression rows added. Negative control: against the unary version they
fail exactly 3 - the ternary call on 'rank, plus both subscriber
assertions - and nothing else.
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.
No description provided.