I have created a RelNode "FunctionJoin" that takes in input relation and the 
name of a java method to call to create new rows from an existing row 
(Array[Any] => Array[Array[Any]])

It's like a join but the rows of right relation are created on demand using the 
rows of the left relation.

I have something working using  a converter rule that creates an 
EnumerableFunctionJoin that calls the java method for each of the input rows.
I also have rules to move filters & projects past the FunctionJoin to the 
FunctionJoin input (I think operating on LogicalCalc might simplify things as I 
can't move filters and projects at the same time).

It has been a good learning experience but before I go too far I thought I 
would ask whether this already exists or whether a different approach would 
make sense.

For example, is TableFunctionScan the same thing? It seems similar but I can't 
find any example uses and I don't know how I would create a RexNode that calls 
a java method.

thanks for any pointers
Thomas

Reply via email to