This topic describes Gandiva, supported functions, and limitations.
The Gandiva feature supports efficient evaluation of arbitrary SQL expressions on Arrow buffers using runtime code generation in LLVM. It uses LLVM tools to generate and compile code that makes optimal use of underlying CPU architecture. By combining LLVM with Apache Arrow libraries, Gandiva can perform low-level operations on Arrow in-memory buffers that are highly optimized for specific runtime environments, thus:
- Improving resource utilization
- Providing faster, lower-cost operations of analytical workloads
LLVM tools are a set of modular compiler tools that deal with code generation. They are used to compile and execute arbitrary expressions efficiently (instead of interpreting them). In the Dremio context, this is useful for generating code at runtime for two SQL operators that deal with arbitrary user expressions such as Project and Filter.
If you use a combination of supported and non-supported functions, the code generation uses both Java and Gandiva splits.
|Function Type||Supported Functions|
|Operators||Arithmetic : +, -, *, /,
Relational : <, >, <=, >=, ==
|Conditional||Case statements support|
Gandiva does not support Windows.