pkoppstein
pkoppstein
@01mf02 - Please note that https://github.com/jqlang/jq/pull/3326 concerns the pseudo-arithmetic operators, for which the parsing rules were long understood to be problematic, so in the context of assessing the significance of...
@A4-Tacks - Many moons ago, there was indeed some discussion about defining min(s) and max(s) for streams. My recollection is that there was agreement that max(empty) should emit the empty...
Here are filters for performing relational joins that may be suitable for your "standard library" and/or builtin.jq. Suggestions for improvement are welcome! These filters emit streams and are therefore named...
@nicowilliams wrote: > JOIN(INDEX(.assets[]; .assetid); .descriptions[]; .classid; {assetid:(.[1].assetid),name:(.[0].name)})' {"assetid": 1, "name": "alpha" } {"assetid": 2, "name": "beta" } {"assetid": 2, "name": "gamma" } And there's the main problem. As the...
@nicowilliams - With your JOIN and the following query (which corresponds with the one specified by the OP), the four "expected" results are obtained: JOIN(INDEX(.assets[]; [.classid,.instanceid]); .descriptions[]; [.classid,.instanceid]; {assetid:(.[1].assetid),name:(.[0].name)}) ```...
> += is kinda broken. There's an issue open for that. Yes, I opened it (#1508). I don't think it's relevant in this particular case.
> a proper switch statement Can't wait! FYPI, I've updated the posting that defines the family of `joins` functions. Core functionality is now provided by `joins(s1; s2; filter1; filter2; p1;...
> remove the SQL-ish functions in master I agree that JOIN can wait; I would like to see a decent IN (assuming there's no time to fix index/1); and certainly...
@nicowilliams - The thing is that INDEX and especially IN have been quite widely "advertised" and used, so if you drop them both without a replacement, it will hurt. As...
[EDIT: left_joins/6 was corrected on Jan 21, 2018.] @caramdache - Here are lightly-tested “LEFT JOIN” filters. I've also revised `distinct/1` so that it will handle strings more efficiently. ``` #...