risingwavelabs/risingwave · error

unimplemented field generator {}

Error message

unimplemented field generator {}

What it means

`FieldGeneratorImpl::with_number_sequence` only supports a fixed set of numeric `DataType`s (e.g. ints, floats). Passing any other type (e.g. timestamp, boolean, struct) hits the catch-all `_` arm and returns this error.

Source

Thrown at src/common/src/field_generator/mod.rs:150

                split_index,
                split_num,
                offset,
            )?)),
            DataType::Float32 => Ok(FieldGeneratorImpl::F32Sequence(F32SequenceField::new(
                start,
                end,
                split_index,
                split_num,
                offset,
            )?)),
            DataType::Float64 => Ok(FieldGeneratorImpl::F64Sequence(F64SequenceField::new(
                start,
                end,
                split_index,
                split_num,
                offset,
            )?)),
            _ => Err(anyhow!("unimplemented field generator {}", data_type)),
        }
    }

    pub fn with_number_random(
        data_type: DataType,
        min: Option<String>,
        max: Option<String>,
        seed: u64,
    ) -> Result<Self> {
        match data_type {
            DataType::Int16 => Ok(FieldGeneratorImpl::I16Random(I16RandomField::new(
                min, max, seed,
            )?)),
            DataType::Int32 => Ok(FieldGeneratorImpl::I32Random(I32RandomField::new(
                min, max, seed,
            )?)),
            DataType::Int64 => Ok(FieldGeneratorImpl::I64Random(I64RandomField::new(
                min, max, seed,

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Use datagen `sequence` only on numeric columns (TINYINT..INT64, FLOAT32/64).
  2. Switch the generator: use `random` for other types or a dedicated timestamp/varchar generator (`with_timestamp`, etc.).
  3. If the type should be supported, add a match arm in `with_number_sequence` for that DataType.
  4. Check the column order/type mapping in the datagen option so the generator matches the actual column type.

Example fix

-- before
col TIMESTAMP WITH TIME ZONE, ... WITH (fields = 'col', sequence = 'seq')
-- after: sequence only on numeric types
col BIGINT, ... WITH (fields = 'col', sequence.max = '1000')
Defensive patterns

Strategy: validation

Validate before calling

fn supports_sequence(t: DataType) -> bool {
    matches!(t, DataType::Int16|DataType::Int32|DataType::Int64|DataType::Float32|DataType::Float64|DataType::Int16..)
}

Try / catch

match FieldGeneratorImpl::with_number_sequence(dt, ...) {
    Ok(g) => g,
    Err(e) if e.to_string().starts_with("unimplemented field generator") =>
        return Err(anyhow!("column type {:?} does not support datagen sequence; use random or a numeric type", dt)),
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: Calling `FieldGeneratorImpl::with_number_sequence(data_type, start, end, ...)` (or the datagen generator path that invokes it) with a `DataType` outside the supported numeric set, such as `DataType::Timestamp`, `Boolean`, or `Varchar`.

Common situations: Using datagen with a `SEQUENCE` field generator on a non-numeric column in a CREATE SOURCE/TABLE ... WITH (connector='datagen') statement; new data types added to RisingWave but not to the generator match arms.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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