-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Search before asking
- I had searched in the issues and found no similar issues.
Description
Scenario 1
Background
I'm developing a UDF, which loads an IP Database in memory on initialization for querying the physical address for a certain IPv4 address.
For example, "123.123.46.46" is located in Chaoyang District, Beijing.
Problem
What I planned is to provide two UDF entry String getProvince(String) and String getCity(String) in one JAR. It works, but it seems that each UDF is supported by a standalone instance of the JAR, which is a waste of resources.
Proposal
- Create a jar resource first;
- Create Java UDFs based on the jar resource;
This way the two UDFs can share the same in memory database.
Scenario 2
Proposal
Provide a way for atomically replacing Java UDFs to avoid unexpected calls from running queries.
Scenario 3
Proposal
Allow defining environment variables in PROPERTIES when creating a Java UDF, to avoid hard coded parameters (e.g. Certain configuration differ between prod/test deployments.)
Use case
No response
Related issues
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct