godfreyhe opened a new pull request #11321: [FLINK-15585] [table] Improve 
function identifier string in plan digest
URL: https://github.com/apache/flink/pull/11321
 
 
   
   ## What is the purpose of the change
   
   *Currently, we use UserDefinedFunction#functionIdentifier as the identifier 
string of UDFs in plan digest. The  identifier string looks like 
    
org$apache$flink$table$planner$utils$TableFunc1$8050927803993624f40152a838c98018.
 It's verbose to users and will be change if the UserDefinedFunction is updated.
   This pr aim to improve this, here is the principles:
   1) If the UDF has a catalog function name, we can just use the catalog name 
as the digest. Otherwise, fallback to (2).
   2) If the UDF doesn't contain fields, we just use the full calss name as the 
digest. Otherwise, fallback to (3).
   3) Use identifier string which will do the full serialization.*
   
   
   ## Brief change log
   
     - *UserDefinedFunction#functionIdentifier returns the class name if the 
function has no constructor or only one constructor without any parameter, else 
returns the class name and instance's md5.
     - *unify function identifier and and display name *
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - *Many existing tests' plan should be updated*
     - *Added UserDefinedFunctionTest to verify the plan of different kinds of 
UDF*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** 
/ don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / 
don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs 
/ **not documented**)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to