Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Impala 2.6.0
-
None
Description
There are multiple places in the backend which explicitly punt on codegen if there is CHAR type involved. Examples include:
ScalarFnCall::GetCodegendComputeFn(...) { .... for (int i = 0; i < GetNumChildren(); ++i) { if (children_[i]->type().type == TYPE_CHAR) { *fn = NULL; return Status("ScalarFnCall Codegen not supported for CHAR"); } } .... }
StructType* TupleDescriptor::GetLlvmStruct(LlvmCodeGen* codegen) const { ... // Add the slot types to the struct description. for (int i = 0; i < slots().size(); ++i) { SlotDescriptor* slot_desc = slots()[i]; if (slot_desc->type().type == TYPE_CHAR) return NULL; <<--- slot_desc->field_idx_ = slot_desc->slot_idx_ + num_null_bytes_; DCHECK_LT(slot_desc->field_idx(), struct_fields.size()); struct_fields[slot_desc->field_idx()] = codegen->GetType(slot_desc->type()); } .... }
The support for CHAR was disabled in f1c4e49905c57d91a8af455fe2537ae9cfb8110c because of various bugs.
IMPALA-5560 simplified the CHAR data type implementation and IMPALA-3931 added some support for codegen of a FIXED_UDA_INTERMEDIATE type with the same memory layout as CHAR. We've also fixed the other cases where codegen was disabled for specific data types, so enabling char codegen may actually be less error-prone than keeping it disabled and requiring all the requisite error-handling.
Attachments
Issue Links
- is related to
-
IMPALA-8402 Add targeted perf tests for CHAR
- Open
-
IMPALA-5560 Consider always storing CHAR() slots inline
- Resolved
1.
|
Add Char codegen support to helpers | Resolved | Tim Armstrong | |
2.
|
Add Char codegen support to text scanner | Open | Unassigned | |
3.
|
Test coverage for codegen with CHAR type | Open | Unassigned |