{"record":{"id":"015417c1d2da6cf2","repo":"risingwavelabs/risingwave","slug":"iceberg-field-value-value-exceeds-integer","errorCode":null,"errorMessage":"Iceberg {field} value {value} exceeds INTEGER","messagePattern":"Iceberg (.+?) value (.+?) exceeds INTEGER","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/metadata.rs","lineNumber":129,"sourceCode":"    content_size_in_bytes: Option<i64>,\n}\n\nfn to_i64(value: u64, field: &'static str) -> ConnectorResult<i64> {\n    value\n        .try_into()\n        .map_err(|_| anyhow!(\"Iceberg {field} value {value} exceeds BIGINT\").into())\n}\n\nfn optional_u64_to_i64(value: Option<u64>, field: &'static str) -> ConnectorResult<Option<i64>> {\n    value.map(|value| to_i64(value, field)).transpose()\n}\n\nfn optional_u32_to_i32(value: Option<u32>, field: &'static str) -> ConnectorResult<Option<i32>> {\n    value\n        .map(|value| {\n            value\n                .try_into()\n                .map_err(|_| anyhow!(\"Iceberg {field} value {value} exceeds INTEGER\").into())\n        })\n        .transpose()\n}\n\nfn append_row(\n    builder: &mut DataChunkBuilder,\n    row: impl Fields,\n) -> ConnectorResult<Option<DataChunk>> {\n    Ok(builder.append_one_row(row.into_owned_row()))\n}\n\n/// Read one Iceberg metadata relation and emit bounded [`DataChunk`]s.\n#[try_stream(ok = DataChunk, error = ConnectorError)]\npub async fn scan_iceberg_metadata(\n    table: Table,\n    metadata_type: IcebergMetadataTableType,\n    time_travel_info: Option<IcebergTimeTravelInfo>,\n    chunk_size: usize,","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/metadata.rs#L111-L147","documentation":"u32 values from Iceberg metadata (e.g. manifest fields like snapshot counts or sequence numbers stored as u32) are converted to i32 for the INTEGER-typed metadata column. If the u32 value exceeds i32::MAX, conversion fails with this error.","triggerScenarios":"Scanning iceberg_manifests metadata table where a u32 field value is above 2,147,483,647.","commonSituations":"Rare; requires a manifest with an extremely large u32 metric value, usually from corruption or synthetic data.","solutions":["Check the manifest file for corrupted/abnormal values","Rebuild or rewrite the affected manifest list/metadata","Report upstream if a valid Iceberg table triggers it"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if v > i32::MAX as u32 { return Err(\"u32 value exceeds INTEGER\"); }","typeGuard":"fn fits_i32(v: u32) -> bool { v <= i32::MAX as u32 }","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"exceeds INTEGER\") => log::warn!(\"metadata u32 out of i32 range\"),\n    other => other?,\n}","preventionTips":["Validate manifest metrics against Iceberg spec ranges","Investigate tables written by non-standard writers"],"tags":["iceberg","metadata","integer-overflow"],"backgroundTag":"value-out-of-range","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"}