❓ I was wondering how Flink handles calls to one and the same UDF that's applied multiple times in a single Flink SQL / Table API query running on a task manager... e.g. if I do `SELECT MY_UDF(col1), MY_UDF(col2) FROM some_table`:
• will Flink create two instances of MY_UDF, one for each usage?
• will Flink create only a single MY_UDF instance and reuse this across the two usages?
• is any of the above guaranteed to be consistently applied on the same / across different Flink version?
• can any such behavior be configured / forced to some degree?
THX for any in-depth insights on this. 🙏
Addendum: Let's assume a single TM with parallelism=1 and deterministic scalar function.