Skip to content

Spread not returning values from fused array #6995

@philrz

Description

@philrz
$ echo -e '{"items":[{"v":1},{"v":2}]}\n{"items":[],"b":"x"}' > data.json &&
  super -i fjson -c "values [...items]" data.json
[]
[]

Details

Repro is with super commit d2bf6ef.

The query above is a simplification of the "union" query that's performed as part of the GitHub Archive benchmarks.

FROM 'gha.json'
| UNNEST [...payload.pull_request.assignees, payload.pull_request.assignee]
| WHERE this IS NOT NULL
| AGGREGATE count() BY assignee:=login
| ORDER BY count DESC
| LIMIT 5;

The values are returned as expected if the data is read via the regular JSON reader.

$ super -version
Version: v0.3.0-157-gd2bf6ef03

$ super -i json -c "values [...items]" data.json
[{v:1},{v:2}]
[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions