{"record":{"id":"c895e58dc1f62361","repo":"risingwavelabs/risingwave","slug":"unimplemented-field-generator","errorCode":null,"errorMessage":"unimplemented field generator {}","messagePattern":"unimplemented field generator (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/common/src/field_generator/mod.rs","lineNumber":150,"sourceCode":"                split_index,\n                split_num,\n                offset,\n            )?)),\n            DataType::Float32 => Ok(FieldGeneratorImpl::F32Sequence(F32SequenceField::new(\n                start,\n                end,\n                split_index,\n                split_num,\n                offset,\n            )?)),\n            DataType::Float64 => Ok(FieldGeneratorImpl::F64Sequence(F64SequenceField::new(\n                start,\n                end,\n                split_index,\n                split_num,\n                offset,\n            )?)),\n            _ => Err(anyhow!(\"unimplemented field generator {}\", data_type)),\n        }\n    }\n\n    pub fn with_number_random(\n        data_type: DataType,\n        min: Option<String>,\n        max: Option<String>,\n        seed: u64,\n    ) -> Result<Self> {\n        match data_type {\n            DataType::Int16 => Ok(FieldGeneratorImpl::I16Random(I16RandomField::new(\n                min, max, seed,\n            )?)),\n            DataType::Int32 => Ok(FieldGeneratorImpl::I32Random(I32RandomField::new(\n                min, max, seed,\n            )?)),\n            DataType::Int64 => Ok(FieldGeneratorImpl::I64Random(I64RandomField::new(\n                min, max, seed,","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/field_generator/mod.rs#L132-L168","documentation":"`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.","triggerScenarios":"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`.","commonSituations":"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.","solutions":["Use datagen `sequence` only on numeric columns (TINYINT..INT64, FLOAT32/64).","Switch the generator: use `random` for other types or a dedicated timestamp/varchar generator (`with_timestamp`, etc.).","If the type should be supported, add a match arm in `with_number_sequence` for that DataType.","Check the column order/type mapping in the datagen option so the generator matches the actual column type."],"exampleFix":"-- before\ncol TIMESTAMP WITH TIME ZONE, ... WITH (fields = 'col', sequence = 'seq')\n-- after: sequence only on numeric types\ncol BIGINT, ... WITH (fields = 'col', sequence.max = '1000')","handlingStrategy":"validation","validationCode":"fn supports_sequence(t: DataType) -> bool {\n    matches!(t, DataType::Int16|DataType::Int32|DataType::Int64|DataType::Float32|DataType::Float64|DataType::Int16..)\n}","typeGuard":null,"tryCatchPattern":"match FieldGeneratorImpl::with_number_sequence(dt, ...) {\n    Ok(g) => g,\n    Err(e) if e.to_string().starts_with(\"unimplemented field generator\") =>\n        return Err(anyhow!(\"column type {:?} does not support datagen sequence; use random or a numeric type\", dt)),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Only attach datagen sequence options to numeric columns","Map field generators by column DataType explicitly in tooling","Update generator match arms when new DataTypes are added"],"tags":["rust","datagen","field-generator","unsupported-type"],"backgroundTag":"unsupported-operation","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"}