---
cases:
  - note: aggregates/reduce ref dest
    query: data.generated.p = x
    modules:
      - |
        package generated

        p if {
        	__local0__ = data.a[3]
        	max([1, 2, 3, 4], __local0__)
        }
    data:
      a:
        - 1
        - 2
        - 3
        - 4
    want_result:
      - x: true
