Hi , I want to use calcite to parse UDTF(user-defined table function) but have some problems. Suppose we have registered a UDTF named “split” with a string parameters. Calcite support this : “SELECT * FROM TABLE(split(‘hello world’)) AS t(s)” .
However, I want the UDTF accept the other table’s columns such as: “SELECT MyTable.*, t.s FROM MyTable, TABLE(split(MyTable.a)) AS t(s)”, but calcite throws can not find “MyTable” exception. Actually I want to implement something like HIVE UDTF, such as “SELECT posexplode(myCol) AS (pos, myNewCol) FROM myTable” Or “select pos, myNewCol From myTable lateral view posexplode(myCol) as (pos, myNewCol)”. Is there any way to do this in calcite ? - Jark Wu
