{"record":{"id":"bc4455b6ac10a518","repo":"risingwavelabs/risingwave","slug":"unexpected-url-column-type-expected-varchar","errorCode":null,"errorMessage":"unexpected url column type, expected varchar","messagePattern":"unexpected url column type, expected varchar","errorType":"error_code","errorClass":"SinkError::Http","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/http.rs","lineNumber":348,"sourceCode":"                        Ok(url) => Ok(Some(url)),\n                        Err(err) => {\n                            tracing::warn!(\n                                error = %err.as_report(),\n                                payload = %self.strip_payload_for_log(row),\n                                \"skip HTTP sink row due to invalid URL in url column\"\n                            );\n                            Ok(None)\n                        }\n                    }\n                }\n                Some(ScalarRefImpl::Utf8(_)) | None => {\n                    tracing::warn!(\n                        payload = %self.strip_payload_for_log(row),\n                        \"skip HTTP sink row due to null or empty url column\"\n                    );\n                    Ok(None)\n                }\n                Some(_) => Err(SinkError::Http(anyhow!(\n                    \"unexpected url column type, expected varchar\"\n                ))),\n            },\n        }\n    }\n\n    fn strip_payload_for_log(&self, row: &impl Row) -> String {\n        match row.datum_at(self.payload_index) {\n            Some(ScalarRefImpl::Utf8(s)) => strip_text_payload(s),\n            Some(ScalarRefImpl::Jsonb(j)) => strip_jsonb_payload(j),\n            Some(_) => \"<unexpected payload type>\".to_owned(),\n            None => \"NULL\".to_owned(),\n        }\n    }\n\n    fn extract_payload(&self, row: &impl Row) -> Result<Option<String>> {\n        Ok(match row.datum_at(self.payload_index) {\n            Some(ScalarRefImpl::Utf8(s)) => Some(s.to_owned()),","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/http.rs#L330-L366","documentation":"At write time, `extract_url` reads the datum at the configured url column index and expects `ScalarRefImpl::Utf8`. If the datum is some other scalar variant (which should be impossible after validation, but can happen if schema changed or validation was bypassed), the row write fails with this SinkError::Http.","triggerScenarios":"A row's `url` column datum is not `ScalarRefImpl::Utf8` during `write_chunk` -> `extract_url` — e.g. the source schema changed after the sink was created (column type altered), or an in-memory/Internal sink path feeds unexpected datum types.","commonSituations":"ALTER TABLE/TABLE type change after sink creation; streaming source with unstable schema delivering a non-string value into the url column; bugs in connector wiring passing wrong column index.","solutions":["Recreate the sink so validation re-runs against the current schema","Ensure the url column is and stays VARCHAR; cast upstream in the sink query","Check whether the source schema changed since sink creation and fix the column type"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_utf8(d: &ScalarRefImpl) -> bool { matches!(d, ScalarRefImpl::Utf8(_)) }","tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"unexpected url column type\") => {\n        // schema drifted; recreate sink or fix url column type\n    }\n    other => other?,\n}","preventionTips":["Avoid ALTER TABLE type changes on the url column while a sink is attached","Recreate sinks after schema changes so validation re-runs","Cast url columns to VARCHAR upstream"],"tags":["sink","http","runtime-error","type-mismatch"],"backgroundTag":"type-mismatch","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"}