Loading the parity record
Fetching the measured run — the pinned upstream oracle, every symbol and every case.
Fetching the measured run — the pinned upstream oracle, every symbol and every case.
Parity / jq
Every number on this page was produced by running both implementations over the same cases: the real jq package pinned at 1.7.1 answers first, and its answer is the expectation the Go port is held to. Nothing is a hand-written expectation, so a new upstream release re-scores the port on its own. See jq for the port's own documentation. Source: github.com/malcolmston/jq.
Not a generic diagram: every node below names an artefact of this harness — the pinned package it installed, the runner files it started, the case files it streamed, and the counts it wrote out.
| Case group | Cases | Match | Mismatch | Group parity |
|---|---|---|---|---|
| control | 88 | 81 | 7 | 92.0% |
| collections | 57 | 55 | 2 | 96.5% |
| core | 52 | 52 | 0 | 100.0% |
| strings | 52 | 48 | 4 | 92.3% |
| paths | 48 | 44 | 1 | 91.7% |
| builtins | 47 | 47 | 0 | 100.0% |
| arith | 45 | 40 | 0 | 88.9% |
| misc | 41 | 26 | 14 | 63.4% |
| math | 40 | 14 | 25 | 35.0% |
| objects | 37 | 32 | 4 | 86.5% |
| regex | 35 | 33 | 0 | 94.3% |
| errors | 21 | 20 | 1 | 95.2% |
| vars | 11 | 11 | 0 | 100.0% |
Every exported symbol of the upstream package, and what the port offers for it. The upstream list is derived mechanically, never from a README: jq -n -c 'builtins | sort' # 218 symbols, name/arity
jq --version # jq-1.7.1. A symbol with no case is untested, never a match.
| Upstream symbol | Go symbol | Status | Cases | Note |
|---|---|---|---|---|
| IN/1 | IN/1 | match | in-filter-1 | |
| IN/2 | IN/2 | match | in-filter-2 | |
| INDEX/1 | INDEX/1 | match | index-builtin-2 | |
| INDEX/2 | INDEX/2 | match | index-builtin-1 | |
| JOIN/2 | JOIN/2 | match | join-builtin-2 | |
| JOIN/3 | JOIN/3 | match | join-builtin-3 | |
| JOIN/4 | JOIN/4 | match | join-builtin-4 | |
| abs/0 | abs/0 | match | math-abs | |
| acos/0 | acos/0 | match | b-acos | |
| acosh/0 | acosh/0 | match | b-acosh | |
| add/0 | add/0 | match | add-array, add-strings, add-empty, add-object, add-mixed-err | |
| all/0 | all/0 | match | b-all-0 | |
| all/1 | all/1 | match | b-all-1 | |
| all/2 | all/2 | match | b-all-2 | |
| any/0 | any/0 | match | any-all, any-all-empty | |
| any/1 | any/1 | match | any-all-cond | |
| any/2 | any/2 | match | any-all-gen | |
| arrays/0 | arrays/0 | match | b-arrays | |
| ascii_downcase/0 | ascii_downcase/0 | match | ascii-downcase, ascii-downcase-nonstring-err | |
| ascii_upcase/0 | ascii_upcase/0 | match | ascii-upcase | |
| asin/0 | asin/0 | differs | b-asin, math-trig, math-asin-ulp | C libm vs Go math: last-ULP difference (not yet in API-DEVIATIONS.md) |
| asinh/0 | asinh/0 | match | b-asinh | |
| atan/0 | atan/0 | match | b-atan | |
| atan2/2 | atan2/2 | match | math-two-arg | |
| atanh/0 | atanh/0 | match | b-atanh | |
| booleans/0 | booleans/0 | match | b-booleans | |
| bsearch/1 | bsearch/1 | match | bsearch-found, bsearch-insert | |
| builtins/0 | builtins/0 | match | builtins-count, builtins-is-array | |
| capture/1 | capture/1 | match | capture-named, capture-nomatch | |
| capture/2 | capture/2 | match | capture-multi-flags | |
| cbrt/0 | cbrt/0 | match | math-roots | |
| ceil/0 | ceil/0 | match | b-ceil | |
| combinations/0 | combinations/0 | match | combinations | |
| combinations/1 | combinations/1 | match | combinations-n | |
| contains/1 | contains/1 | match | contains-str, contains-arr, contains-obj, contains-type-err | |
| copysign/2 | — | missing | math-copysign | not ported; not ported |
| cos/0 | cos/0 | match | b-cos | |
| cosh/0 | cosh/0 | match | b-cosh | |
| debug/0 | debug/0 | match | debug-passthrough | |
| debug/1 | debug/1 | match | debug-msg | |
| del/1 | del/1 | match | del-field, del-iterate-sel, del-index, del-slice, del-nonexistent, del-multiple-nested | |
| delpaths/1 | delpaths/1 | match | delpaths, delpaths-order, delpaths-empty-path | |
| drem/2 | drem/2 | match | b-drem | |
| empty/0 | empty/0 | match | empty-builtin | |
| endswith/1 | endswith/1 | match | endswith | |
| env/0 | env/0 | match | env-parity, env-tz, env-type | |
| erf/0 | — | missing | math-erf | not ported; not ported |
| erfc/0 | — | missing | math-erfc | not ported; not ported |
| error/0 | error/0 | match | error-zero-arity | |
| error/1 | error/1 | match | error-msg, error-null, error-catch-nonstring, error-obj-uncaught, error-in-map | |
| exp/0 | exp/0 | match | b-exp, math-exp-log | |
| exp10/0 | exp10/0 | match | b-exp10 | |
| exp2/0 | exp2/0 | match | b-exp2 | |
| explode/0 | explode/0 | match | explode, explode-nonstring-err | |
| expm1/0 | expm1/0 | match | b-expm1 | |
| fabs/0 | fabs/0 | match | b-fabs | |
| fdim/2 | — | missing | math-fdim | not ported; not ported |
| finites/0 | finites/0 | match | typed-finites-normals | |
| first/0 | first/0 | match | first-0 | |
| first/1 | first/1 | match | first-of-generator, first-empty-err | |
| flatten/0 | flatten/0 | differs | flatten-default, flatten-nonarray | jq flattens an object's values; the port errors |
| flatten/1 | flatten/1 | match | flatten-depth, flatten-neg-err | |
| floor/0 | floor/0 | match | math-rounding, math-floor-string-err | |
| fma/3 | — | missing | math-fma | not ported; not ported |
| fmax/2 | — | missing | math-fmax | not ported; not ported |
| fmin/2 | — | missing | math-fmin | not ported; not ported |
| fmod/2 | fmod/2 | match | b-fmod | |
| format/1 | format/1 | match | format-fn | |
| frexp/0 | — | missing | math-frexp | not ported; not ported |
| from_entries/0 | from_entries/0 | differs | from-entries, from-entries-kv | jq 1.7 does not accept a bare k as the key alias |
| fromdate/0 | fromdate/0 | match | b-fromdate | |
| fromdateiso8601/0 | fromdateiso8601/0 | match | b-fromdateiso8601 | |
| fromjson/0 | fromjson/0 | match | fromjson-bad-err | |
| fromstream/1 | — | missing | fromstream | not ported; fromstream/truncate_stream are documented as not implemented |
| gamma/0 | — | missing | math-gamma | not ported; not ported |
| get_jq_origin/0 | — | missing | origin-jq | not ported; not ported |
| get_prog_origin/0 | — | missing | origin-prog | not ported; not ported |
| get_search_list/0 | — | missing | origin-search-list | not ported; not ported |
| getpath/1 | getpath/1 | match | getpath, getpath-missing, getpath-through-num-err, getpath-nonpath-err, getpath-num-key-on-obj-err | |
| gmtime/0 | gmtime/0 | match | gmtime-array | |
| group_by/1 | group_by/1 | match | group-by, group-by-nonarray-err | |
| gsub/2 | gsub/2 | match | gsub-basic, gsub-empty-match, gsub-named | |
| gsub/3 | gsub/3 | match | gsub-flags | |
| halt/0 | halt/0 | match | halt-plain | |
| halt_error/0 | halt_error/0 | match | halt-error | |
| halt_error/1 | halt_error/1 | match | halt-error-code | |
| has/1 | has/1 | differs | has-obj, has-array, has-string-err, has-null | jq answers false rather than erroring |
| hypot/2 | hypot/2 | match | b-hypot | |
| implode/0 | implode/0 | differs | implode, implode-invalid-codepoint, implode-surrogate-err, implode-nonarray-err | jq substitutes U+FFFD; the port errors |
| in/1 | in/1 | match | in-op, in-nonobj-err | |
| index/1 | index/1 | match | index-str | |
| indices/1 | indices/1 | differs | indices-str, indices-arr, indices-null, indices-empty-str, indices-arr-in-str-err | jq propagates null instead of erroring |
| infinite/0 | infinite/0 | match | infinite-output | |
| input/0 | input/0 | match | input-stub | |
| input_filename/0 | input_filename/0 | differs | input-filename | the port has no file-input concept, so input_filename is null (not yet in API-DEVIATIONS.md) |
| input_line_number/0 | input_line_number/0 | match | input-line-number, input-line-number-null | |
| inputs/0 | inputs/0 | match | inputs-stub | |
| inside/1 | inside/1 | match | inside | |
| isempty/1 | isempty/1 | match | isempty | |
| isfinite/0 | — | missing | math-isfinite | not ported; not ported |
Every case the harness streamed to both runners, with the exact upstream symbol and Go symbol it exercised. A deliberate, documented difference is a deviation and is counted apart from a mismatch.
| Case | Group | Upstream symbol | Go symbol | Status | Note |
|---|---|---|---|---|---|
| add-nums | arith | + | + | match | |
| add-str | arith | + | + | match | |
| add-arr | arith | + | + | match | |
| add-obj-merge | arith | + | + | match | right operand wins |
| add-null-left | arith | + | + | match | |
| add-null-right | arith | + | + | match | |
| add-null-null | arith | + | + | match | |
| add-str-num-err | arith | + | + | match | type error on both sides |
| add-obj-arr-err | arith | + | + | match | |
| sub-nums | arith | - | - | match | |
| sub-arrays | arith | - | - | match | array difference removes every occurrence |
| sub-str-err | arith | - | - | match | |
| mul-nums | arith | * | * | match | |
| mul-str-num | arith | * | * | match | |
| mul-str-zero | arith | * | * | match | |
| mul-obj-deep-merge | arith | * | * | match | |
| div-nums | arith | / | / | match | |
| div-zero | arith | / | / | match | division by zero must fail on both sides |
| div-zero-zero | arith | / | / | match | |
| div-strings-split | arith | / | / | match | |
| mod-nums | arith | % | % | match | |
| mod-neg | arith | % | % | match | |
| mod-zero | arith | % | % | match | |
| mod-float-trunc | arith | % | % | match | |
| neg-unary | arith | -(unary) | -(unary) | match | |
| neg-string-err | arith | -(unary) | -(unary) | match | |
| cmp-lt-nums | arith | < | < | match | |
| cmp-sort-order-types | arith | < | < | match | jq's total order across types |
| cmp-eq-objects | arith | == | == | match | |
| cmp-ne | arith | != | != | match | |
| cmp-ge-le | arith | >= | >= | match | |
| bool-and | arith | and | and | match | |
| bool-or | arith | or | or | match | |
| bool-not | arith | not/0 | not/0 | match | |
| bool-shortcircuit | arith | and | and | match | short circuit must not evaluate the error |
| number-float-format | arith | tojson/0 | tojson/0 | deviation | numbers are float64 only; jq preserves the literal text of untouched numbers |
| number-precision-int | arith | tojson/0 | tojson/0 | deviation | numbers are float64 only; jq preserves the literal text of untouched numbers |
| number-big-literal | arith | tojson/0 | tojson/0 | deviation | numbers are float64 only; jq preserves the literal text of untouched numbers |
| number-large-int-arith | arith | tojson/0 | tojson/0 | deviation | numbers are float64 only; jq preserves the literal text of untouched numbers |
| tostring-number | arith | tostring/0 | tostring/0 | deviation | numbers are float64 only; jq preserves the literal text of untouched numbers |
| number-neg-zero | arith | tojson/0 | tojson/0 | match | |
| nan-output | arith | nan/0 | nan/0 | match | jq prints nan as null |
| infinite-output | arith | infinite/0 | infinite/0 | match | |
| nan-inf-predicates | arith | isnan/0 | isnan/0 | match | |
| tojson-nan | arith | tojson/0 | tojson/0 | match | |
| b-acos | builtins | acos/0 | acos/0 | match | |
| b-acosh | builtins | acosh/0 | acosh/0 | match | |
| b-asin | builtins | asin/0 | asin/0 | match | |
| b-asinh | builtins | asinh/0 | asinh/0 | match | |
| b-atan | builtins | atan/0 | atan/0 | match | |
| b-atanh | builtins | atanh/0 | atanh/0 | match | |
| b-cos | builtins | cos/0 | cos/0 | match | |
| b-cosh | builtins | cosh/0 | cosh/0 | match | |
| b-sin | builtins | sin/0 | sin/0 | match | |
| b-sinh | builtins | sinh/0 | sinh/0 | match | |
| b-tan | builtins | tan/0 | tan/0 | match | |
| b-tanh | builtins | tanh/0 | tanh/0 | match | |
| b-exp | builtins | exp/0 | exp/0 | match | |
| b-exp2 | builtins | exp2/0 | exp2/0 | match | |
| b-exp10 | builtins | exp10/0 | exp10/0 | match | |
| b-expm1 | builtins | expm1/0 | expm1/0 | match | |
| b-log | builtins | log/0 | log/0 | match | |
| b-log2 | builtins | log2/0 | log2/0 | match | |
| b-log10 | builtins | log10/0 | log10/0 | match | |
| b-log1p | builtins | log1p/0 | log1p/0 | match | |
| b-hypot | builtins | hypot/2 | hypot/2 | match | |
| b-fmod | builtins | fmod/2 | fmod/2 | match | |
| b-drem | builtins | drem/2 | drem/2 | match | |
| b-ldexp | builtins | ldexp/2 | ldexp/2 | match | |
| b-significand | builtins | significand/0 | significand/0 | match | |
| b-fabs | builtins | fabs/0 | fabs/0 | match | |
| b-ceil | builtins | ceil/0 | ceil/0 | match | |
| b-round | builtins | round/0 | round/0 | match | |
| b-rint | builtins | rint/0 | rint/0 | match | |
| b-nearbyint | builtins | nearbyint/0 | nearbyint/0 | match | |
| b-trunc | builtins | trunc/0 | trunc/0 | match | |
| b-isinfinite | builtins | isinfinite/0 | isinfinite/0 | match | |
| b-isnormal | builtins | isnormal/0 | isnormal/0 | match | |
| b-all-0 | builtins | all/0 | all/0 | match | |
| b-all-1 | builtins | all/1 | all/1 | match | |
| b-all-2 | builtins | all/2 | all/2 | match | |
| b-max-0 | builtins | max/0 | max/0 | match | |
| b-arrays | builtins | arrays/0 | arrays/0 | match | |
| b-booleans | builtins | booleans/0 | booleans/0 | match | |
| b-iterables | builtins | iterables/0 | iterables/0 | match | |
| b-nulls | builtins | nulls/0 | nulls/0 | match | |
| b-objects | builtins | objects/0 | objects/0 | match | |
| b-scalars | builtins | scalars/0 | scalars/0 | match | |
| b-strings | builtins | strings/0 | strings/0 | match | |
| b-normals | builtins | normals/0 | normals/0 | match | |
| b-fromdate | builtins | fromdate/0 | fromdate/0 | match | |
| b-fromdateiso8601 | builtins | fromdateiso8601/0 | fromdateiso8601/0 | match | |
| sort-nums | collections | sort/0 | sort/0 | match | |
| sort-mixed-types | collections | sort/0 | sort/0 | match | |
| sort-objects | collections | sort/0 | sort/0 | match | |
| sort-nonarray-err | collections | sort/0 | sort/0 | match | |
| sort-by-key | collections | sort_by/1 | sort_by/1 | match | |
| sort-by-multi | collections | sort_by/1 | sort_by/1 | match | |
| sort-by-stable | collections | sort_by/1 | sort_by/1 | match | stability |
| sort-by-nonarray-err | collections | sort_by/1 | sort_by/1 | match |