[refactor](jni) unified jni framework for java udf (#25302)
Use the unified jni framework to refactor java udf. The unified jni framework takes VectorTable as the container to transform data between c++ and java, and hide the details of data format conversion. In addition, the unified framework supports complex and nested types. The performance of basic types remains consistent, with a 30% improvement in string types and an order of magnitude improvement in complex types.
This commit is contained in:
@ -114,25 +114,12 @@ private:
|
||||
const DataTypes _argument_types;
|
||||
const DataTypePtr _return_type;
|
||||
|
||||
struct IntermediateState {
|
||||
size_t buffer_size;
|
||||
size_t row_idx;
|
||||
|
||||
IntermediateState() : buffer_size(0), row_idx(0) {}
|
||||
};
|
||||
|
||||
struct JniEnv {
|
||||
/// Global class reference to the UdfExecutor Java class and related method IDs. Set in
|
||||
/// Init(). These have the lifetime of the process (i.e. 'executor_cl_' is never freed).
|
||||
jclass executor_cl;
|
||||
jmethodID executor_ctor_id;
|
||||
jmethodID executor_evaluate_id;
|
||||
jmethodID executor_convert_basic_argument_id;
|
||||
jmethodID executor_convert_array_argument_id;
|
||||
jmethodID executor_convert_map_argument_id;
|
||||
jmethodID executor_result_basic_batch_id;
|
||||
jmethodID executor_result_array_batch_id;
|
||||
jmethodID executor_result_map_batch_id;
|
||||
jmethodID executor_close_id;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user