{"record":{"id":"4014300f9ea6925a","repo":"risingwavelabs/risingwave","slug":"undefined-field-name-at-path","errorCode":null,"errorMessage":"Undefined field `{name}` at `{path}`","messagePattern":"Undefined field `(.+?)` at `(.+?)`","errorType":"exception","errorClass":"AccessError","httpStatus":null,"severity":"error","filePath":"src/connector/codec/src/decoder/mod.rs","lineNumber":28,"sourceCode":"// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npub mod avro;\npub mod json;\npub mod protobuf;\npub mod utils;\n\nuse risingwave_common::error::NotImplemented;\nuse risingwave_common::types::{DataType, Datum, DatumCow, ToOwnedDatum};\nuse thiserror::Error;\nuse thiserror_ext::Macro;\n\n#[derive(Error, Debug, Macro)]\n#[thiserror_ext(macro(mangle, path = \"crate::decoder\"))]\npub enum AccessError {\n    #[error(\"Undefined field `{name}` at `{path}`\")]\n    Undefined { name: String, path: String },\n    #[error(\"Cannot parse value `{value}` with type `{got}` into expected type `{expected}`\")]\n    TypeError {\n        expected: String,\n        got: String,\n        value: String,\n    },\n    #[error(\"Unsupported data type `{ty}`\")]\n    UnsupportedType { ty: String },\n\n    /// CDC auto schema change specific error that may include table context\n    #[error(\"CDC auto schema change error: unsupported data type `{ty}` in table `{table_name}`\")]\n    CdcAutoSchemaChangeError { ty: String, table_name: String },\n\n    #[error(\"Unsupported additional column `{name}`\")]\n    UnsupportedAdditionalColumn { name: String },\n\n    #[error(\"Fail to convert protobuf Any into jsonb: {0}\")]","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/codec/src/decoder/mod.rs#L10-L46","documentation":"AccessError::Undefined is defined in src/connector/codec/src/decoder/mod.rs:28. It is thrown when a decoder/accessor tries to read a named field (e.g. accessing a column by name) that does not exist in the record's schema at the given path. It carries the missing field `name` and the `path` where the lookup happened.","triggerScenarios":"Accessing `accessor.access(field_name, ...)` / record field access on a decoded payload where the field name is not present in the current schema object — e.g. a Protobuf/Avro/JSON accessor navigating into a nested object that lacks the expected field.","commonSituations":"Source schema (registered in RisingWave) drifted from the actual payload: upstream renamed or removed a field; column name casing mismatch (upstream uses camelCase, RW expects snake_case); reading a nested struct path where an intermediate value is a scalar.","solutions":["Align the RisingWave table/source column definitions with the actual upstream payload fields (recreate the source with the correct schema)","Check field name casing and exact spelling against the upstream schema","Enable/use schema registry so the schema is fetched from the payload rather than hand-declared","Handle the field as optional in the upstream producer so it is always present"],"exampleFix":"-- before\nCREATE SOURCE s (user_id INTEGER, usr_name VARCHAR) ...;\n-- after (field actually named 'user_name' in payload)\nCREATE SOURCE s (user_id INTEGER, user_name VARCHAR) ...;","handlingStrategy":"try-catch","validationCode":"fn validate_columns(payload_fields: &[&str], rw_columns: &[&str]) -> Vec<String> {\n    rw_columns.iter()\n        .filter(|c| !payload_fields.contains(c))\n        .map(|c| c.to_string())\n        .collect()\n}","typeGuard":null,"tryCatchPattern":"match accessor.access(record, \"user_name\") {\n    Ok(v) => v,\n    Err(AccessError::Undefined { name, path }) => {\n        tracing::warn!(name, path, \"missing field; using default\");\n        Datum::None\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Keep RW source schemas in sync with upstream producer schemas","Enforce consistent field naming (snake_case) across producer and consumer","Use schema registry-managed schemas rather than hand-written ones"],"tags":["access","missing-field","decoder"],"backgroundTag":"entity-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}