Looking at this again, it also seems like StructObjectInspector#getAllStructFieldRefs() returns a list, so Row#getPrimitive(i) might be slower than the toSeq above...