Ping, any idea? Thanks a lot. Shuyi
On Tue, Nov 7, 2017 at 11:00 AM, Shuyi Chen <[email protected]> wrote: > Hi, > > I want to use the row value constructor and CAST to create a named row, or > even nested named row, e.g. > > CREATE TYPE myrowtype AS (f1 INTEGER, f2 VARCHAR(10)) > SELECT CAST(ROW(intField, "test") AS myrowtype) AS myRow FROM myTable; > > So if converted to JSON, the output will be {"myRow":{"f0": ${intField}, > "f1":"test"}}. > > I tried it out, the RVC and CAST are working, but seems Calcite doesn't > support CREATE TYPE in the grammar. Please correct me if I am wrong. > Thanks a lot. > > Shuyi > > -- > "So you have to trust that the dots will somehow connect in your future." > -- "So you have to trust that the dots will somehow connect in your future."
