incubator-doris [Feature] Support Java UDF

vuv7lop3  于 2022-04-22  发布在  Java
关注(0)|答案(0)|浏览(169)

Search before asking

  • I had searched in the issues and found no similar issues.

Description

Backgroup

Doris currently supports both Native UDF and Remote UDF for user-defined functions.

Native UDF is written in C++ and has the best performance, but it is more difficult to write and debug, and may be limited by some system library versions(such as libc) that may not be compatible after upgrade.

Remote UDF solves the language problem very well, and in theory, UDF logic can be written in any language. But the disadvantage is that users need to implement their own high-performance UDF Service, and the efficiency is not good because of the RPC problem.

Motivation

Support for Java UDF is motivated by the following points:

  1. the Java language is widely used, rich support for related library functions, and a low threshold for development and debugging.
  2. Some big data ecologies such as Hive, Spark, etc. already exist a large number of ready-made UDF, we need to be compatible with these udf to reduce the migration costs of users.
  3. If there is bug in UDF, it will not cause BE crash

How to implement

Need to start the JVM and call the relevant UDF logic from the BE side by way of JNI.

Referance:

Remote UDF: #7519
Lua UDF:#5979

Use case

  • No response*
  • No response*

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题