{"record":{"id":"751e6f63a71798db","repo":"apache/flink","slug":"column","errorCode":null,"errorMessage":"Column ","messagePattern":"Column ","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbSchemaValidationUtils.java","lineNumber":83,"sourceCode":"        validateTypeMatch(descriptor, rowType);\n    }\n\n    /**\n     * Validate type match of row type.\n     *\n     * @param descriptor the {@link Descriptors.Descriptor} of the protobuf object.\n     * @param rowType the corresponding {@link RowType} to the {@link Descriptors.Descriptor}\n     */\n    private static void validateTypeMatch(Descriptors.Descriptor descriptor, RowType rowType) {\n        rowType.getFields()\n                .forEach(\n                        rowField -> {\n                            FieldDescriptor fieldDescriptor =\n                                    descriptor.findFieldByName(rowField.getName());\n                            if (null != fieldDescriptor) {\n                                validateTypeMatch(fieldDescriptor, rowField.getType());\n                            } else {\n                                throw new ValidationException(\n                                        \"Column \"\n                                                + rowField.getName()\n                                                + \" does not exist in definition of proto class.\");\n                            }\n                        });\n    }\n\n    /**\n     * Validate type match of general type.\n     *\n     * @param fd the {@link Descriptors.Descriptor} of the protobuf object.\n     * @param logicalType the corresponding {@link LogicalType} to the {@link FieldDescriptor}\n     */\n    private static void validateTypeMatch(FieldDescriptor fd, LogicalType logicalType) {\n        if (!fd.isRepeated()) {\n            if (fd.getJavaType() != JavaType.MESSAGE) {\n                // simple type\n                validateSimpleType(fd, logicalType.getTypeRoot());","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbSchemaValidationUtils.java#L65-L101","documentation":"During CREATE TABLE schema validation, every RowType field is looked up by name in the proto Descriptor via findFieldByName. If no proto field with that name exists, this ValidationException is thrown naming the column. It fires at DDL time, before any data flows.","triggerScenarios":"A table column (including computed/metadata columns that survive validation) whose name has no matching field in the protobuf message class; case mismatches; renamed proto fields after regeneration.","commonSituations":"DDL written from an outdated .proto; column names auto-generated by tools (e.g. camelCase vs snake_case differences); joining schemas from different services.","solutions":["Rename the DDL column to exactly match the proto field name (proto field names are case-sensitive).","Remove columns that do not exist in the message, or add them to the .proto and regenerate.","Use computed columns (AS) or watermarks only on fields that exist; keep metadata columns out of the physical schema."],"exampleFix":"-- before (proto field is order_id)\nCREATE TABLE t (orderId BIGINT, ...) ...\n-- after\nCREATE TABLE t (order_id BIGINT, ...) ...","handlingStrategy":"validation","validationCode":"Descriptors.Descriptor d = PbFormatUtils.getDescriptor(className);\nfor (RowField f : rowType.getFields()) {\n    if (d.findFieldByName(f.getName()) == null)\n        throw new ValidationException(\"No proto field \" + f.getName());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate DDLs from the .proto (or vice versa) so names cannot drift.","Remember proto field lookup is case-sensitive; keep naming style consistent."],"tags":["protobuf","schema-validation","ddl","naming"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}