malloydata / malloy

Malloy is an experimental language for describing data relationships and transformations.
http://www.malloydata.dev
MIT License
1.99k stars 76 forks source link

Sources with only complex columns generate internal error #1452

Open whscullin opened 1 year ago

whscullin commented 1 year ago

What happens?

If you have a source that only has columns that are non-scalar, like

source: ary is duckdb.sql("SELECT [1,2,3] AS a")

you get the message: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) which is coming from

To Reproduce

  1. Create a source with only complex columns:
    source: ary is duckdb.sql("SELECT [1,2,3] AS a")
  2. Click "Preview"

OS:

all

Malloy Client:

all

Malloy Client Version:

latest

Database Connection:

all

whscullin commented 1 year ago

Appears to come from this line: https://github.com/malloydata/malloy/blob/main/packages/malloy/src/model/malloy_query.ts#L2687