presto-example-http/src/main/java/io/prestosql/plugin/example/ExampleRecordCursor.java/ExampleRecordCursor/checkFieldType
class ExampleRecordCursor:    private void checkFieldType(int field, Type expected)
    {
        Type actual = getType(field);
        checkArgument(actual.equals(expected), "Expected field %s to be type %s but is %s", field, expected, actual);
    }