diqiu50 opened a new issue, #13939:
URL: https://github.com/apache/gravitino/issues/13939

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `BaseCatalog.listFunctions` lists every function that has a `SPARK` runtime 
implementation, whatever its language. `loadFunction` takes the first `SPARK` 
implementation and throws `IllegalArgumentException("Unsupported function 
implementation ...")` if it is not a Java one.
   
   As a result:
   - A function registered for Spark with only a SQL or Python implementation 
shows up in `SHOW FUNCTIONS`, then fails with an internal error when called.
   - A function with both a SQL and a Java `SPARK` implementation fails if the 
SQL one comes first.
   
   Expected: Spark lists and loads only functions with a Java `SPARK` 
implementation, and loading uses that implementation wherever it appears in the 
definition.
   
   ### Error message and/or stacktrace
   
   ```
   java.lang.IllegalArgumentException: Unsupported function implementation 
<impl class name>
   ```
   
   ### How to reproduce
   
   1. Register a function with a SQL implementation for the `SPARK` runtime.
   2. Run `SHOW FUNCTIONS` in Spark: the function is listed.
   3. Call the function: it fails with the error above.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to