walterddr commented on issue #7448: URL: https://github.com/apache/pinot/issues/7448#issuecomment-922168972
Initial design is: 0. make `ScalarFunction` annotation support both class annotation and *static* method annotation - static version is the current implementation - class annotation supports both stateless and stateful version (this requires the PreprocessableScalarFunction interface to support 3 interface processStateful / processStateless / init) 1. make `FunctionInvoker` support instantiating both the stateful and the stateless version of a "ScalarFunction" annotation. e.g. depending on the owner of this `FunctionInvoker` it can initialize invokable function in either stateful or stateless way --> this gives back the control to the owner (ScalarFunctionWrapper, or InBuiltFunctionEvaluator) to use the stateful or stateless version 2. owner of `FunctionInvoker` decided to connect with either the stateful or the stateless interface (e.g. for ingestion we should probably use the stateless interface, while in query we probably can parse the Literal Transform and use the stateful version 3. Existing user of the FunctionInvoker as is will go through the stateless code path, even with the class annotation. it will still go through the stateless implementation thanks to the additional API requirement. Happy to take feedbacks on this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org