{"record":{"id":"444529fb08adba1e","repo":"risingwavelabs/risingwave","slug":"iceberg-field-value-value-exceeds-bigint","errorCode":null,"errorMessage":"Iceberg {field} value {value} exceeds BIGINT","messagePattern":"Iceberg (.+?) value (.+?) exceeds BIGINT","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/metadata.rs","lineNumber":117,"sourceCode":"    file_format: String,\n    spec_id: i32,\n    record_count: i64,\n    file_size_in_bytes: i64,\n    equality_ids: Option<Vec<i32>>,\n    sort_order_id: Option<i32>,\n    snapshot_id: Option<i64>,\n    data_sequence_number: Option<i64>,\n    file_sequence_number: Option<i64>,\n    manifest_path: String,\n    referenced_data_file: Option<String>,\n    content_offset: Option<i64>,\n    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,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/metadata.rs#L99-L135","documentation":"Iceberg metadata tables expose u64 metrics (e.g. file content sizes) that must be stored as BIGINT (i64) in the metadata scan result. to_i64 converts u64 to i64 and errors if the value exceeds i64::MAX, which would otherwise wrap silently.","triggerScenarios":"Scanning an Iceberg metadata table (e.g. iceberg_files) where a u64 statistic such as content_size_in_bytes exceeds i64::MAX (~9.2 exabytes).","commonSituations":"Practically never hit in real deployments; would require a corrupt or synthetic metadata entry with an absurdly large file size value.","solutions":["Verify table metadata is not corrupted (check manifest/metadata JSON files)","Report to RisingWave maintainers if a legitimate value triggers this","Downscale the table's data if sizes are genuinely near i64::MAX"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if size_u64 > i64::MAX as u128 { return Err(\"content size exceeds BIGINT\"); }","typeGuard":"fn fits_i64(v: u64) -> bool { v <= i64::MAX as u64 }","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"exceeds BIGINT\") => log::warn!(\"metadata value out of i64 range\"),\n    other => other?,\n}","preventionTips":["Treat huge u64 metadata values as corruption signals","Keep Iceberg metadata files under writer-imposed limits"],"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"}