Source:
<code>protected Object convertGroup(Group group) { Object obj; try { obj = pojoClass.newInstance(); } catch (InstantiationException | IllegalAccessException ex) { throw new RuntimeException(ex); } for (int i = 0; i < columnFieldSetters.size(); i++) { ParquetFilePOJOReader.ActiveFieldInfo afi = columnFieldSetters.get(i); <START> <END> afi = columnFieldSetters.get(i); int fieldIndex = schema.getFieldIndex(afi.fieldInfo.getColumnName()); SupportType st = afi.fieldInfo.getType(); switch (st) { case BOOLEAN: Boolean booleanVal = Boolean.parseBoolean(group.getValueToString(fieldIndex, 0)); pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, booleanVal); break; case INTEGER: Integer intVal = Integer.parseInt(group.getValueToString(fieldIndex, 0)); pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, intVal); break; case LONG: Long longVal = Long.parseLong(group.getValueToString(fieldIndex, 0)); pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, longVal); break; case FLOAT: Float floatVal = Float.parseFloat(group.getValueToString(fieldIndex, 0)); pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, floatVal); break; case DOUBLE: Double doubleVal = Double.parseDouble(group.getValueToString(fieldIndex, 0)); pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, doubleVal); break; case STRING: pojoSetters.get(afi.fieldInfo.getPojoFieldExpression()).set(obj, group.getValueToString(fieldIndex, 0)); break; default: throw new ParquetEncodingException("Unsupported column type: " + schema.getType(fieldIndex)); } } return obj; }</code><technical_language>Adding a try/catch help.Exception in setting field group fail parquet supports schema evolution</technical_language>

Target:
protected Object convertGroup(Group group) { Object obj; try { obj = pojoClass.newInstance(); } catch (InstantiationException | IllegalAccessException ex) { throw new RuntimeException(ex); } for (int i = 0; i < activeFieldInfos.size(); i++) { try { ParquetFilePOJOReader.ActiveFieldInfo afi = activeFieldInfos.get(i); switch (afi.primitiveTypeName) { case BOOLEAN: Boolean booleanVal = Boolean.parseBoolean(group.getValueToString(afi.fieldIndex, 0)); ((PojoUtils.SetterBoolean<Object>)afi.setter).set(obj, booleanVal); break; case INT32: Integer intVal = Integer.parseInt(group.getValueToString(afi.fieldIndex, 0)); ((PojoUtils.SetterInt<Object>)afi.setter).set(obj, intVal); break; case INT64: Long longVal = Long.parseLong(group.getValueToString(afi.fieldIndex, 0)); ((PojoUtils.SetterLong<Object>)afi.setter).set(obj, longVal); break; case FLOAT: Float floatVal = Float.parseFloat(group.getValueToString(afi.fieldIndex, 0)); ((PojoUtils.SetterFloat<Object>)afi.setter).set(obj, floatVal); break; case DOUBLE: Double doubleVal = Double.parseDouble(group.getValueToString(afi.fieldIndex, 0)); ((PojoUtils.SetterDouble<Object>)afi.setter).set(obj, doubleVal); break; case BINARY: ((PojoUtils.Setter<Object, String>)afi.setter).set(obj, group.getValueToString(afi.fieldIndex, 0)); break; default: throw new ParquetEncodingException("Unsupported column type: " + afi.primitiveTypeName); } } catch (InvalidRecordException e) { logger.error("Field not found in schema ", e); } } return obj; }