walterddr edited a comment on pull request #7114: URL: https://github.com/apache/pinot/pull/7114#issuecomment-920169890
> > Actually I think there might be some optimization we can do when LITERAL is passed in by making the FunctionInfo a bit stateful. but that's for a different optimization PR. > > Are you thinking about precompiling the pattern? I was thinking the same regarding the JsonPath functions where precompilation would improve performance, I also think it would better to be able to e.g. validate and clean inputs once. correct. it's already so in the TransformFuntion, but i dont know if this is possible via ScalarTransformFunctionWrapper. AFAIK the underlying function is stateless. My thinking is that we need to - somehow alter the ScalarTransformFunctionWrapper to provide stateful storage for the underlying stateless function; - initialize the wrapper transform function state during expression parsing phase - somehow hook the function initialization logic when expression parsing out a Literal and its position - somehow allow the underlying function to access the wrapper storage I would be completely wrong here as I dont have a deep enough understanding on what the wrapper were original designed for. any feedback/suggestions are highly appreciated -- 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