if (!(oi instanceof StructObjectInspector)) {
oi = s.getObjectInspector();
break;
}
StructObjectInspector soi = (StructObjectInspector)oi;
StructField sf = soi.getStructFieldRef(names[i]);
if (sf == null) {
// If invalid field, then return the schema of the table
oi = s.getObjectInspector();
break;
} else {
oi = sf.getFieldObjectInspector();
}
}
// rules on how to recurse the SerDe based on its type
if (oi.getCategory() != Category.STRUCT) {