---
cases:
  - data: {}
    modules:
      - |
        package generated

        p[x] {
          arr = [[1, [2]], [1, []], [2, [2]]]
          arr[_] = [x, [2]]
        }
    note: undos/arrays-length
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - 1
          - 2
