Buggy code:
public class EndpointTupleIterator implements ITupleIterator { private static final Logger logger = LoggerFactory . getLogger ( EndpointTupleIterator . class ) ; private final IISegment seg ; private final StorageContext context ; private final List < FunctionDesc > measures ; private final String factTableName ; private final List < TblColRef > columns ; private final List < String > columnNames ; private final TupleInfo tupleInfo ; private final TableRecordInfo tableRecordInfo ; private final CoprocessorRowType pushedDownRowType ; private final CoprocessorFilter pushedDownFilter ; private final CoprocessorProjector pushedDownProjector ; private final EndpointAggregators pushedDownAggregators ; Iterator < List < IIProtos . IIResponse . IIRow > > regionResponsesIterator = null ; ITupleIterator tupleIterator = null ; HTableInterface table = null ; int rowsInAllMetric = 0 ; public EndpointTupleIterator ( IISegment segment , TupleFilter rootFilter , Collection < TblColRef > groupBy , List < FunctionDesc > measures , StorageContext context , HConnection conn ) throws Throwable { } private void rewriteMeasureParameters ( List < FunctionDesc > measures , List < TblColRef > columns ) { } @ Override public boolean hasNext ( ) { } @ Override public ITuple next ( ) { } @ Override public void close ( ) { } private IIRequest prepareRequest ( ) throws IOException { } private Iterator < List < IIProtos . IIResponse . IIRow > > getResults ( final IIProtos . IIRequest request , HTableInterface table ) throws Throwable { } private TupleInfo buildTupleInfo ( ) { } private List < String > getColumnNames ( List < TblColRef > dimensionColumns ) { } private String findName ( TblColRef column , Map < TblColRef , String > aliasMap ) { } class SingleRegionTupleIterator implements ITupleIterator { private List < IIProtos . IIResponse . IIRow > rows ; private int index = 0 ; private TableRecord tableRecord ; private List < Object > measureValues ; private Tuple tuple ; private RowKeyColumnIO rowKeyColumnIO ; public SingleRegionTupleIterator ( List < IIProtos . IIResponse . IIRow > rows ) { } @ Override public boolean hasNext ( ) { } @ Override public ITuple next ( ) { } @ Override public void close ( ) { } private ITuple makeTuple ( TableRecord tableRecord , List < Object > measureValues ) { List < String > columnValues = Lists . newArrayList ( ) ; for ( int i = 0 ; i < ( columns . size ( ) ) ; ++ i ) { final TblColRef tblColRef = columns . get ( i ) ; columnValues . add ( rowKeyColumnIO . readColumnString ( tblColRef , tableRecord . getBytes ( ) , tableRecordInfo . getDigest ( ) . offset ( i ) , tableRecordInfo . getDigest ( ) . length ( i ) ) ) ; } for ( int i = 0 ; i < ( columnNames . size ( ) ) ; i ++ ) { TblColRef column = columns . get ( i ) ; if ( ! ( tuple . hasColumn ( column ) ) ) { continue ; } final String columnName = columnNames . get ( i ) ; if ( tableRecordInfo . getDigest ( ) . isMetrics ( i ) ) { tuple . setDimensionValue ( columnName , tableRecord . getValueString ( i ) ) ; } else { tuple . setDimensionValue ( columnName , columnValues . get ( i ) ) ; } } if ( measureValues != null ) { for ( int i = 0 ; i < ( measures . size ( ) ) ; ++ i ) { if ( ! ( measures . get ( i ) . isDimensionAsMetric ( ) ) ) { String fieldName = measures . get ( i ) . getRewriteFieldName ( ) ; Object value = measureValues . get ( i ) ; String dataType = tuple . getDataType ( fieldName ) ; <START_BUG> if ( dataType . toLowerCase ( ) . equalsIgnoreCase ( "hllc" ) ) { <END_BUG> value = Tuple . convertOptiqCellValue ( ( ( String ) ( value ) ) , dataType ) ; } tuple . setMeasureValue ( fieldName , value ) ; } } } return tuple ; } } }

Fix:
if ( value instanceof String ) {