LLVM Application Scenarios and Restrictions
Application Scenarios
- Expressions supporting LLVM
The query statements that contain the following expressions support LLVM optimization:
- CASE...WHEN...
- IN
- Bool (AND/OR/NOT)
- BooleanTest (IS_NOT_KNOWN/IS_UNKNOWN/IS_TRUE/IS_NOT_TRUE/IS_FALSE/IS_NOT_FALSE)
- NullTest (IS_NOT_NULL/IS_NULL)
- Operator
- Function (lpad, substring, btrim, rtrim, and length)
- Nullif
Supported data types for expression computing are bool, tinyint, smallint, int, bigint, float4, float8, numeric, date, time, timetz, timestamp, timestamptz, interval, bpchar, varchar, text, and oid.
Consider using LLVM dynamic compilation and optimization only if expressions are used in the following content in a vectorized executor: filter in the Scan node; complicate hash condition, hash join filter, and hash join target in the Hash Join node; filter and join filter in the Nested Loop node; merge join filter and merge join target in the Merge Join node; and filter in the Group node.
- Operators that can use LLVM:
- Join: HashJoin
- Agg: HashAgg
- Sort
Where HashJoin supports only Hash Inner Join, and the corresponding hash cond supports comparisons between int4, bigint, and bpchar. HashAgg supports sum and avg operations of bigint and numeric data types. Group By statements supports int4, bigint, bpchar, text, varchar, timestamp, and count(*) aggregation operation. The sort operator supports data type's comparison operations, such as int4, bigint, numeric, bpchar, text, and varchar. In addition, LLVM dynamic compilation optimization cannot be used, which can be displayed by using the explain performance tool.
Non-applicable Scenarios
- LLVM dynamic compilation and optimization are not supported on CNs.
- Tables have small amount of data cannot be dynamically compiled.
- Query jobs with a non-vectorized execution path cannot be generated.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot