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 are using a combination of supported and non-supported functions, your code generation defaults to Java.
|Function Type||Supported Functions|
|Operators||Arithmetic : +, -, *, /,
Relational : <, >, <=, >=, ==
|Conditional||Case statements support|
Gandiva is not supported on Windows and CentOS 6. If Gandiva is enabled on one of these operating systems, the following occurs:
The default, Java, is used for all operations and the following error is displayed:
2018-09-27 22:23:59,071 [e0 - 2452451d-7b0b-a561-9a9e-270714fee800:frag:0:0] ERROR c.d.s.o.l.expr.GandivaPushdownSieve - Exception in running sieve org.apache.arrow.gandiva.exceptions.GandivaException: gandiva_jni.dll was not found inside JAR.
The query fails and the following error is displayed:
SYSTEM ERROR: UnsatisfiedLinkError: /tmp/libgandiva_jni.sod52c7dfb-4edc-4e72-941b-7ba7e0eed6bc: /lib64/libc.so.6: version `GLIBC_2.15' not found ‘