public List<String> fieldNames() {
        return fields.stream().map(f -> f.name).collect(Collectors.toList());
    }
Returns all field names in an array.
indexr-query-opt/src/main/java/org/apache/spark/sql/types/StructType.java