risingwavelabs/risingwave · error

Iceberg value exceeds BIGINT

Error message

Iceberg {field} value {value} exceeds BIGINT

What it means

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.

Solutions

  1. Verify table metadata is not corrupted (check manifest/metadata JSON files)
  2. Report to RisingWave maintainers if a legitimate value triggers this
  3. Downscale the table's data if sizes are genuinely near i64::MAX
Defensive patterns

Strategy: try-catch

Validate before calling

if size_u64 > i64::MAX as u128 { return Err("content size exceeds BIGINT"); }

Type guard

fn fits_i64(v: u64) -> bool { v <= i64::MAX as u64 }

Try / catch

match result {
    Err(e) if e.to_string().contains("exceeds BIGINT") => log::warn!("metadata value out of i64 range"),
    other => other?,
}

Prevention

When it happens

Trigger: 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).

Common situations: Practically never hit in real deployments; would require a corrupt or synthetic metadata entry with an absurdly large file size value.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/444529fb08adba1e. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/sink/iceberg/metadata.rs:117

    file_format: String,
    spec_id: i32,
    record_count: i64,
    file_size_in_bytes: i64,
    equality_ids: Option<Vec<i32>>,
    sort_order_id: Option<i32>,
    snapshot_id: Option<i64>,
    data_sequence_number: Option<i64>,
    file_sequence_number: Option<i64>,
    manifest_path: String,
    referenced_data_file: Option<String>,
    content_offset: Option<i64>,
    content_size_in_bytes: Option<i64>,
}

fn to_i64(value: u64, field: &'static str) -> ConnectorResult<i64> {
    value
        .try_into()
        .map_err(|_| anyhow!("Iceberg {field} value {value} exceeds BIGINT").into())
}

fn optional_u64_to_i64(value: Option<u64>, field: &'static str) -> ConnectorResult<Option<i64>> {
    value.map(|value| to_i64(value, field)).transpose()
}

fn optional_u32_to_i32(value: Option<u32>, field: &'static str) -> ConnectorResult<Option<i32>> {
    value
        .map(|value| {
            value
                .try_into()
                .map_err(|_| anyhow!("Iceberg {field} value {value} exceeds INTEGER").into())
        })
        .transpose()
}

fn append_row(
    builder: &mut DataChunkBuilder,

View on GitHub (pinned to 6469eb736d)