@Override
  public Object get(int fieldNum) {
    try {
      StructField fref = soi.getAllStructFieldRefs().get(fieldNum);
      return HCatRecordSerDe.serializeField(
        soi.getStructFieldData(wrappedObject, fref),
          fref.getFieldObjectInspector());
    } catch (SerDeException e) {
      throw new IllegalStateException("SerDe Exception deserializing",e);
    }
  }
@Test
  public void testGetWithName() throws Exception {
    TypeInfo ti = getTypeInfo();
    HCatRecord r = new LazyHCatRecord(getHCatRecord(), getObjectInspector(ti));
    HCatSchema schema = HCatSchemaUtils.getHCatSchema(ti)
                        .get(0).getStructSubSchema();
    Assert.assertEquals(INT_CONST, ((Integer) r.get("an_int", schema)).intValue());
    Assert.assertEquals(LONG_CONST, ((Long) r.get("a_long", schema)).longValue());
    Assert.assertEquals(DOUBLE_CONST, ((Double) r.get("a_double", schema)).doubleValue(), 0);
    Assert.assertEquals(STRING_CONST, r.get("a_string", schema));
  }