{"record":{"id":"12ff973daea3e119","repo":"risingwavelabs/risingwave","slug":"can-t-find","errorCode":null,"errorMessage":"Can't find {}","messagePattern":"Can't find (.+?)","errorType":"exception","errorClass":"SinkError::BigQuery","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/big_query.rs","lineNumber":698,"sourceCode":"                ..Default::default()\n            };\n            descriptor_proto.field.push(field);\n        }\n\n        let descriptor_pool = build_protobuf_descriptor_pool(&descriptor_proto)?;\n        let message_descriptor = descriptor_pool\n            .get_message_by_name(&config.common.table)\n            .ok_or_else(|| {\n                SinkError::BigQuery(anyhow::anyhow!(\n                    \"Can't find message proto {}\",\n                    config.common.table\n                ))\n            })?;\n        let proto_field = if !is_append_only {\n            let proto_field = message_descriptor\n                .get_field_by_name(CHANGE_TYPE)\n                .ok_or_else(|| {\n                    SinkError::BigQuery(anyhow::anyhow!(\"Can't find {}\", CHANGE_TYPE))\n                })?;\n            Some(proto_field)\n        } else {\n            None\n        };\n        let row_encoder = ProtoEncoder::new(\n            schema.clone(),\n            None,\n            message_descriptor.clone(),\n            ProtoHeader::None,\n        )?;\n        Ok((\n            Self {\n                write_stream: format!(\n                    \"projects/{}/datasets/{}/tables/{}/streams/_default\",\n                    config.common.project, config.common.dataset, config.common.table\n                ),\n                config,","sourceCodeStart":680,"sourceCodeEnd":716,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/big_query.rs#L680-L716","documentation":"For non-append-only (upsert/mutable) BigQuery sinks, RisingWave adds a synthetic protobuf field named CHANGE_TYPE ('_rw_change_type') to the generated message descriptor to carry row change type. This error means that field could not be found in the built message descriptor even though it should have just been added - an internal inconsistency indicating the field was not appended or its name changed.","triggerScenarios":"BigQuerySinkWriter::new with is_append_only=false, after build_protobuf_descriptor_pool, when message_descriptor.get_field_by_name(CHANGE_TYPE) returns None - e.g. the CHANGE_TYPE field was not pushed to descriptor_proto.field before pool construction, or the registered name differs.","commonSituations":"Running an upsert (debezium/mutable) sink where the pool dropped or renamed the added field; protobuf codegen version mismatch; a code path where descriptor_proto.field was not mutated before building the pool.","solutions":["If you only append data, use an append-only sink so the CHANGE_TYPE field is never required.","Check that the code pushes the CHANGE_TYPE FieldDescriptorProto (name exactly CHANGE_TYPE) into descriptor_proto.field before building the pool.","Rebuild the workspace to clear stale protobuf codegen artifacts and retry.","Inspect message_descriptor field names at runtime to see which fields actually exist."],"exampleFix":"// before\nlet field = message_descriptor.get_field_by_name(CHANGE_TYPE).ok_or_else(|| SinkError::BigQuery(anyhow::anyhow!(\"Can't find {}\", CHANGE_TYPE)))?;\n// after\nassert!(descriptor_proto.field.iter().any(|f| f.name() == CHANGE_TYPE), \"CHANGE_TYPE field missing from descriptor\");","handlingStrategy":"type-guard","validationCode":"-- Only use upsert mode when you truly need mutations;\n-- append-only sinks skip the CHANGE_TYPE field entirely.\n-- Check your sink_type before CREATE SINK: append-only avoids this path.","typeGuard":null,"tryCatchPattern":"match sink_creation {\n    Err(SinkError::BigQuery(e)) if e.to_string().contains(\"Can't find _rw_change_type\") => {\n        // rebuild/upgrade, or switch to an append-only sink, then retry\n    }\n    other => other?,\n}","preventionTips":["Use append-only sinks when your data flow has no updates/deletes.","Keep the RisingWave build free of stale artifacts (rebuild after protobuf-related changes).","Do not hand-edit connector constants like CHANGE_TYPE without updating both the descriptor construction and lookup.","If this fires on a stock build, report it as a bug - it indicates an internal inconsistency."],"tags":["bigquery","protobuf","internal","rust"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}