miller/test/cases/verb-join/ignore-empty-unpaired/expout
John Kerl 1a20b32bb5
join: add --ignore-empty to skip pairing on empty-string join keys (#1194) (#2210)
By default, records with an empty-string value in a join field are
paired just like any other value, so two records both missing an ID
get matched with each other -- rarely the intended behavior.
--ignore-empty treats an empty-string join-field value as if the
field were absent, on both the left and right files, so such records
fall through to unpaired handling (--np/--ul/--ur) instead of
cross-joining on the empty string.

Wires the check through both the default half-streaming join and the
-s/--sorted-input doubly-streaming join, which track left-file
buckets independently and needed the same empty-aware key-presence
check in JoinBucketKeeper.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 16:42:39 -04:00

32 lines
290 B
Text

[
{
"id": 4,
"code": "ff0000",
"color": "red"
},
{
"id": 2,
"code": "00ff00",
"color": "green"
},
{
"id": "",
"color": "white"
},
{
"id": "",
"color": "black"
},
{
"id": 3,
"code": "0000ff"
},
{
"id": "",
"code": "ffffff"
},
{
"id": "",
"code": "000000"
}
]