Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
It already support TUMBLE/HOP/SESSION windowing table-valued function in current version. But in fact, the table-valued function is not just the current features, and we want to support user defined table-valued function, just like the following query:
select * from table(UDTVF(table Shipments))
or
select * from table(UDTVF(select * from Shipments))
The input parameters of 'UDTVF' is the output rowtype of the inner subquery, and the output of 'UDTVF' is defined by users, just like:
final TableValuedFunction tableValuedFunction = (RelDataTypeFactory typeFactory) -> typeFactory.builder() .add("in1", SqlTypeName.INTEGER) .add("in2", SqlTypeName.VARCHAR) .build();
And the expected output logic plan like:
LogicalProject(in1=[$0], in2=[$1]) LogicalTableFunctionScan(invocation=[UDTVF($0, $1)], rowType=[RecordType(INTEGER in1,VARCHAR in2)]) LogicalProject(ORDERID=[$0], ROWTIME=[$1]) LogicalTableScan(table=[[CATALOG, SALES, SHIPMENTS]])
Attachments
Issue Links
- is related to
-
CALCITE-4477 In interpreter, support table-valued functions
- Closed
-
CALCITE-4864 Supports Polymorphic Table function
- Open