Class H2UnnestFunction

All Implemented Interfaces:
SetReturningFunctionRenderer, SqmSetReturningFunctionDescriptor

public class H2UnnestFunction extends UnnestFunction
H2 unnest function.

H2 does not support "lateral" i.e. the use of a from node within another, but we can apply the same trick that we already applied everywhere else for H2, which is to join a sequence table to emulate array element rows and eliminate non-existing array elements by checking the index against array length. Finally, we rewrite the selection expressions to access the array by joined sequence index.