Source:
<code>private static Cell parseCell(List<RiakTsPB.TsColumnDescription> columnDescriptions, int j, OtpErlangObject cell) throws InvalidTermToBinaryException { if (cell instanceof OtpErlangBinary) { final OtpErlangBinary v = (OtpErlangBinary) cell; <START> if (columnDescriptions.get(j).getType() == RiakTsPB.TsColumnType.VARCHAR) <END> { final String s = new String(v.binaryValue(), StandardCharsets.UTF_8); return new Cell(s); } else if (columnDescriptions.get(j).getType() == RiakTsPB.TsColumnType.BLOB) { return new Cell(v.binaryValue()); } } else if (cell instanceof OtpErlangLong) { final OtpErlangLong v = (OtpErlangLong) cell; if (columnDescriptions.get(j).getType() == RiakTsPB.TsColumnType.TIMESTAMP) { return Cell.newTimestamp(v.longValue()); } else if (columnDescriptions.get(j).getType() == RiakTsPB.TsColumnType.SINT64) { return new Cell(v.longValue()); } } else if (cell instanceof OtpErlangDouble) { final OtpErlangDouble v = (OtpErlangDouble) cell; return new Cell(v.doubleValue()); } else if (cell instanceof OtpErlangAtom) { final OtpErlangAtom v = (OtpErlangAtom) cell; return new Cell(v.booleanValue()); } else if (cell instanceof OtpErlangList) { final OtpErlangList l = (OtpErlangList) cell; assert (l.arity() == 0); return null; } throw new InvalidTermToBinaryException("Unknown cell type encountered: " + cell.toString() + ", unable to continue parsing."); }</code><technical_language>IMO throw exception in case is incompatible, silently skip it: switch(columnDescriptions.get(j).getType()){ case RiakTsPB.TsColumnType.VARCHAR:// case RiakTsPB.TsColumnType.BLOB: // default: throw new IllegalStateException(<proper explanation>) }</technical_language>

Target:
private static Cell parseCell(List<RiakTsPB.TsColumnDescription> columnDescriptions, int j, OtpErlangObject cell) throws InvalidTermToBinaryException { if (cell instanceof OtpErlangBinary) { final OtpErlangBinary v = (OtpErlangBinary) cell; final RiakTsPB.TsColumnType type = columnDescriptions.get(j).getType(); switch (type) { case VARCHAR: final String s = new String(v.binaryValue(), StandardCharsets.UTF_8); return new Cell(s); case BLOB: return new Cell(v.binaryValue()); default: throw new IllegalStateException( String.format( "Type '%s' from the provided ColumnDescription contradicts to the actual OtpErlangBinary value", type.name() ) ); } } else if (cell instanceof OtpErlangLong) { final OtpErlangLong v = (OtpErlangLong) cell; final RiakTsPB.TsColumnType type = columnDescriptions.get(j).getType(); switch (type) { case TIMESTAMP: return Cell.newTimestamp(v.longValue()); case SINT64: return new Cell(v.longValue()); default: throw new IllegalStateException( String.format( "Type '%s' from the provided ColumnDescription contradicts to the actual OtpErlangLong value", type.name() ) ); } } else if (cell instanceof OtpErlangDouble) { final OtpErlangDouble v = (OtpErlangDouble) cell; return new Cell(v.doubleValue()); } else if (cell instanceof OtpErlangAtom) { final OtpErlangAtom v = (OtpErlangAtom) cell; return new Cell(v.booleanValue()); } else if (cell instanceof OtpErlangList) { final OtpErlangList l = (OtpErlangList) cell; assert (l.arity() == 0); return null; } throw new InvalidTermToBinaryException("Unknown cell type encountered: " + cell.toString() + ", unable to continue parsing."); }