Can I get one or two reviews of https://github.com/apache/calcite/pull/3394 / https://issues.apache.org/jira/browse/CALCITE-5914 ?
I'm trying to introduce an architecture so that Java functions that need to retain state for performance reasons (e.g. a cached compiled regular expression) are straightforward to write and use. My proposal is to implement such functions using a non-static method. The code generator instantiates the "function object" so that it can call the method, uses the same object throughout the query, and the function can store state in that object. We were already doing it with the RAND function, so it made sense to use the mechanism more widely. Julian
