Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.6.0
Description
HdfsAvroScanner::CodegenReadScalar() doesn't have AVRO_DECIMAL in its switch statement so it will not be codegened if AVRO_DECIMAL is in the schema. However, it appears Avro scanner was ready to call ReadAvroDecimal() all along as the following code snippet suggests:
if (slot_desc != NULL) { // Field corresponds to a materialized column, fill in relevant arguments write_slot_val = builder->getTrue(); if (slot_desc->type().type == TYPE_DECIMAL) { // ReadAvroDecimal() takes slot byte size instead of slot type slot_type_val = builder->getInt32(slot_desc->type().GetByteSize()); } else { slot_type_val = builder->getInt32(slot_desc->type().type); } Value* slot_val = builder->CreateStructGEP(tuple_val, slot_desc->field_idx(), "slot"); opaque_slot_val = builder->CreateBitCast(slot_val, codegen->ptr_type(), "opaque_slot"); }
We should just add AVRO_DECIMAL to the switch statement and see if things work.