substrait-io / substrait-java

Apache License 2.0
75 stars 72 forks source link

feat(isthmus): add WindowRelFunctionConverter #234

Closed bvolpato closed 7 months ago

bvolpato commented 7 months ago

We recently added POJOs for ConsistentPartitionWindowRel and WindowRelFunction. https://github.com/substrait-io/substrait-java/pull/231

The next step is starting to get isthmus support for it, so I went ahead and created WindowRelFunctionConverter so we can start using it to properly bind our window function calls.

It is heavily based on WindowFunctionConverter (although both the input and output changes - input from RexOver to RexWinAggCall, and output from WindowFunctionInvocation to WindowRelFunctionInvocation), so I extracted some converters to top-level classes to improve reusability.