---
cases:
  - data:
      a:
        - 1
        - 2
        - 3
        - 4
    modules:
      - |
        package generated

        p[[x, y]] {
          data.generated.q[x] = 1
          data.generated.q[y] = x
        }

        q[x] = i {
          data.a[i] = x
        }
    note: "virtualdocs/object: self-join"
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - - 2
            - 3
