{"record":{"id":"31a5233e84f4ae8f","repo":"risingwavelabs/risingwave","slug":"url-parse-error-for-local-deltalake-location-wrap","errorCode":null,"errorMessage":"Url parse error for local deltalake location (wrapped error)","messagePattern":"Url parse error for local deltalake location \\(wrapped error\\)","errorType":"exception","errorClass":"SinkError::DeltaLake","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/deltalake.rs","lineNumber":108,"sourceCode":"            .into());\n        }\n\n        Ok(())\n    }\n}\n\nimpl DeltaLakeCommon {\n    pub async fn create_deltalake_client(&self) -> Result<DeltaTable> {\n        let table = match Self::get_table_url(&self.location)? {\n            DeltaTableUrl::S3(s3_path) => {\n                let storage_options = self.build_delta_lake_config_for_aws().await?;\n                deltalake::aws::register_handlers(None);\n                let url = Url::parse(&s3_path).map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table_with_storage_options(url, storage_options).await?\n            }\n            DeltaTableUrl::Local(local_path) => {\n                let url = Url::parse(&format!(\"file://{}\", local_path))\n                    .map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table(url).await?\n            }\n            DeltaTableUrl::Gcs(gcs_path) => {\n                let mut storage_options = HashMap::new();\n                storage_options.insert(\n                    GCS_SERVICE_ACCOUNT.to_owned(),\n                    self.gcs_service_account.clone().ok_or_else(|| {\n                        SinkError::Config(anyhow!(\n                            \"gcs.service.account is required with Google Cloud Storage (GCS)\"\n                        ))\n                    })?,\n                );\n                deltalake::gcp::register_handlers(None);\n                let url = Url::parse(&gcs_path).map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table_with_storage_options(url, storage_options).await?\n            }\n        };\n        Ok(table)","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/deltalake.rs#L90-L126","documentation":"For a local filesystem DeltaLake table, the connector prefixes the stripped local path with 'file://' and parses it into a `Url`. A Url::parse failure is wrapped in SinkError::DeltaLake. This is rare because file:// URLs parse easily, but can occur with odd path contents.","triggerScenarios":"create_deltalake_client with DeltaTableUrl::Local whose path (after stripping 'file://') fails Url::parse when re-wrapped as file://{path} — e.g. path containing control characters or malformed percent-encodings like '%zz'.","commonSituations":"Paths containing stray percent signs or broken percent-encoding ('%zz') or control characters copied from elsewhere; Windows-style or otherwise unusual paths pasted into the location option.","solutions":["Provide a plain absolute path or a valid file:// URL without stray percent signs.","Percent-encode special characters properly (e.g. %25 for a literal %).","Remove control characters/whitespace from the configured location."],"exampleFix":"// before\nLOCATION = 'file:///data/tabl%zz'\n// after\nLOCATION = 'file:///data/table%25data'","handlingStrategy":"validation","validationCode":"let loc = location.trim();\nif !loc.starts_with(\"file://\") {\n    return Err(\"local deltalake location must start with file://\");\n}\nUrl::parse(loc).map_err(|e| format!(\"invalid file URL: {e}\"))?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid stray percent signs in local paths; encode '%' as '%25'.","Use plain absolute paths without control characters."],"tags":["rust","deltalake","local","url"],"backgroundTag":"invalid-url-format","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"}