You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/08/16 20:56:00 UTC

[jira] [Comment Edited] (IMPALA-3207) Support Char type in codegen

    [ https://issues.apache.org/jira/browse/IMPALA-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15917782#comment-15917782 ] 

Tim Armstrong edited comment on IMPALA-3207 at 8/16/18 8:55 PM:
----------------------------------------------------------------

-One problem is that it the LLVM representation is completely wrong: it thinks it has the same representation as a string value, but in reality it's inlined into the tuple for sizes < 128 bytes.-


was (Author: tarmstrong):
One problem is that it the LLVM representation is completely wrong: it thinks it has the same representation as a string value, but in reality it's inlined into the tuple for sizes < 128 bytes.

> Support Char type in codegen
> ----------------------------
>
>                 Key: IMPALA-3207
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3207
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.6.0
>            Reporter: Michael Ho
>            Priority: Minor
>              Labels: codegen
>
> There are multiple places in the backend which explicitly punt on codegen if there is CHAR type involved. Examples include:
> {noformat}
> 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");
>     }
>   }
> ....
> }
> {noformat}
> {noformat}
> 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());
>   }
> ....
> }
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org