Describe the bug, including details regarding any error messages, version, and platform.
The exported functions defined in gandiva are registered multiple times unnecessarily.
Currently, in gandiva, exported functions are registered to the function registry in exported_funcs.h by using a macro REGISTER_EXPORTED_FUNCS, which internally defines a static variable to call the registration. Since this header file (exported_funcs.h) is included in multiple times in different files (7 different files more specifically), this makes the registration happens 7 times for the same set of functions, which is not necessary. It makes the initialization slower, additionally, it makes the registration to contain duplicated functions (although it still works so far).
Component(s)
C++ - Gandiva
Describe the bug, including details regarding any error messages, version, and platform.
The exported functions defined in gandiva are registered multiple times unnecessarily.
Currently, in gandiva, exported functions are registered to the function registry in
exported_funcs.hby using a macroREGISTER_EXPORTED_FUNCS, which internally defines a static variable to call the registration. Since this header file (exported_funcs.h) is included in multiple times in different files (7 different files more specifically), this makes the registration happens 7 times for the same set of functions, which is not necessary. It makes the initialization slower, additionally, it makes the registration to contain duplicated functions (although it still works so far).Component(s)
C++ - Gandiva