$ curl -s -O https://data.gharchive.org/2023-02-08-6.json.gz &&
gunzip 2023-02-08-6.json.gz &&
super -version &&
super -i fjson -c "count() by payload.release.name | name=='asdf'" 2023-02-08-6.json
Version: v0.3.0-173-gb7739a28e
{name:fusion("asdf"::(string|null),<string>),count:1}
{name:"asdf",count:2}
Details
Repro is with super commit b7739a2.
It seems like the nullable union appears due to interplay with other values with others in the data set, since if I isolate just the objects I eventually plan to count, the problem does not occur.
$ jq -c 'select(.payload.release.name == "asdf")' < 2023-02-08-6.json > asdf.json &&
super -i fjson -c "count() by payload.release.name | name=='asdf'" asdf.json
{name:"asdf",count:3}
Since fusion values are typically not intended to be seen by users, I wasn't sure if this counted as a bug. But now that the "auto-defuse" enhancement from #7016 exists, I can see this effect leaking through as bad non-fusion query results.
$ super -version &&
super -i fjson -c "count() by payload.release.name | name=='asdf'" 2023-02-08-6.json
Version: v0.3.0-173-g4c727c771
{name:"asdf",count:2}
{name:"asdf",count:1}
Details
Repro is with super commit b7739a2.
It seems like the nullable union appears due to interplay with other values with others in the data set, since if I isolate just the objects I eventually plan to count, the problem does not occur.
Since fusion values are typically not intended to be seen by users, I wasn't sure if this counted as a bug. But now that the "auto-defuse" enhancement from #7016 exists, I can see this effect leaking through as bad non-fusion query results.