malloy icon indicating copy to clipboard operation
malloy copied to clipboard

Ignored nested select should be a compiler error

Open mtoy-googly-moogly opened this issue 10 months ago • 0 comments

    run: duckdb.sql("""
      SELECT 1 as n, false as even UNION ALL SELECT 2, true
      UNION ALL SELECT 3, false UNION ALL SELECT 4,true
    """) -> {
      group_by: even
      nest: abn is {
        group_by: n, a is 'a', b is 'b'
        nest: next is {
          select: from_n is n, to_n is n + 1, to_even is not even
        }
      }
    }

In this code, the next record in abn is an empty array in the result set, if you change the select: to a group_by: then a reasonable result is generated.

This should either work, or be a compiler error.

mtoy-googly-moogly avatar Apr 05 '24 18:04 mtoy-googly-moogly