presto-local-file/src/main/java/io/prestosql/plugin/localfile/LocalFileRecordCursor.java/LocalFileRecordCursor/checkFieldType
class LocalFileRecordCursor:    private void checkFieldType(int field, Type... expected)
    {
        Type actual = getType(field);
        for (Type type : expected) {
            if (actual.equals(type)) {
                return;
            }
        }
        String expectedTypes = Joiner.on(", ").join(expected);
        throw new IllegalArgumentException(format("Expected field %s to be type %s but is %s", field, expectedTypes, actual));
    }