Omega359 commented on issue #10744: URL: https://github.com/apache/datafusion/issues/10744#issuecomment-2159218833
After attempting to implement the builder approach it became apparent to me that it will touch too many things and really won't work well without changing the signature of ScalarUDFImpl anyways. It works for the aggregate functions because the functions defined in the AggregateUDFImpl trait have arguments where the additional information (distinct, sort, ordering, etc) is provided to the UDF implementation. In the case of ScalarUDFImpl though that is not the case. After some more thought I think the cleanest approach may be to add a get_config_options function to the SimplifyInfo trait and add a `scalar_udf_safe_mode: bool, default = false` to the ExecutionOptions struct. Doing that will allow functions that require configuration (including but obviously not limited to the 'safe' mode I'm working on) to access them while changing as little as possible wrt trait signatures. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org