This is really freaking cool. I'm not often impressed by clever hacks in SQL, but this solves a really annoying problem and the specific way which you solved this problem with just custom functions and operators is ingenious and reassuring, as opposed to some of the other crazy ideas that I've seen to extend SQL.
I would love to see more about how you implemented the lambdas, as that's the one thing that is still non-obvious to me.
I guess mostly how the syntax works. The `$$` thing I mostly recognize as being a code block in custom functions, but I'm not sure how it works in the context of a lambda. Also, is `$value` just a special identifier for the input?
A separate question...is it possible to have tuple-valued timevectors?
The docs have a bit more on it [1]. The $$ is really just a dollar quoted string[2], you can use any sort of string in there, but dollar quoting just makes it a lot easier to read.
On your other question, not right now, but if it's something you want, file a github issue, it's something we've thought a bit about and it gets hairy pretty quickly, but also increases the power of these things dramatically. We'll probably do something with it, but it may be a little while and we may let this stuff bake for a bit first...
I would love to see more about how you implemented the lambdas, as that's the one thing that is still non-obvious to me.