---
cases:
  - data:
      a:
        - 1
        - 2
        - 3
        - 4
      g:
        a:
          - 1
          - 0
          - 0
          - 0
        b:
          - 0
          - 2
          - 0
          - 0
        c:
          - 0
          - 0
          - 0
          - 4
    modules:
      - |
        package generated

        p {
          data.a[i] = data.g[i][j]
        }
    note: "eqexpr/indexing: intersection"
    query: data.generated.p = x
    want_result: []
