risingwavelabs/risingwave · error
Unsupported encoding for Plain
Error message
Unsupported encoding for Plain
What it means
Raised in `PlainParser::new` when `FORMAT PLAIN` is configured with an encoding whose access builder is not supported. Plain (append-only) parsing only supports Json, Protobuf, Avro, and Bytes encodings; any other `EncodingProperties` variant (e.g. Debezium/DebeziumAvro/Maxwell/Canal-style encodings) is rejected at source creation time.
Source
Thrown at src/connector/src/parser/plain_parser.rs:71
) -> ConnectorResult<Self> {
let key_builder = if let Some(key_column_name) = get_key_column_name(&rw_columns) {
Some(AccessBuilderImpl::Bytes(BytesAccessBuilder::new(
EncodingProperties::Bytes(BytesProperties {
column_name: Some(key_column_name),
}),
)?))
} else {
None
};
let payload_builder = match props.encoding_config {
EncodingProperties::Json(_)
| EncodingProperties::Protobuf(_)
| EncodingProperties::Avro(_)
| EncodingProperties::Bytes(_) => {
AccessBuilderImpl::new_default(props.encoding_config).await?
}
_ => bail!("Unsupported encoding for Plain"),
};
let transaction_meta_builder = Some(AccessBuilderImpl::DebeziumJson(
DebeziumJsonAccessBuilder::new(
TimestamptzHandling::GuessNumberUnit,
TimestampHandling::GuessNumberUnit,
TimeHandling::Micro,
BigintUnsignedHandlingMode::Long,
false,
)?,
));
let schema_change_builder = Some(AccessBuilderImpl::DebeziumJson(
DebeziumJsonAccessBuilder::new_for_schema_event()?,
));
Ok(Self {
key_builder,View on GitHub (pinned to 6469eb736d)
Solutions
- Use a supported encoding for FORMAT PLAIN: ENCODE JSON, PROTOBUF, AVRO, or BYTES.
- If the data is Debezium change events, use `FORMAT DEBEZIUM-JSON` (or the matching Debezium format) instead of PLAIN.
- Check the source DDL's FORMAT/ENCODE clauses and recreate the source with a valid combination.
Example fix
// before: invalid combination CREATE SOURCE s (...) WITH (...) FORMAT PLAIN ENCODE DEBEZIUM-JSON; // after: pick the right format CREATE SOURCE s (...) WITH (...) FORMAT DEBEZIUM-JSON ENCODE JSON; -- or: FORMAT PLAIN ENCODE JSON for append-only streams
Defensive patterns
Strategy: validation
Validate before calling
-- Validate FORMAT/ENCODE combination before running DDL: -- PLAIN supports only ENCODE JSON | PROTOBUF | AVRO | BYTES. -- Debezium change streams must use FORMAT DEBEZIUM-JSON (or DEBEZIUM-AVRO).
Prevention
- Match FORMAT to the data: PLAIN for append-only, DEBEZIUM-* for CDC envelopes.
- Consult the RisingWave source format compatibility matrix when writing DDL.
- Test source creation with CREATE ... on a staging cluster before production.
When it happens
Trigger: Creating a source with `FORMAT PLAIN` combined with an unsupported encoding — for instance `FORMAT PLAIN ENCODE DEBEZIUM-JSON` or any encoding variant not in {Json, Protobuf, Avro, Bytes}.
Common situations: Misconfigured CREATE SOURCE statement pairing PLAIN with Debezium encodings; users intending CDC but choosing the wrong format; copy-pasted DDL from a Debezium example missing the ENCODE clause adjustment.
Related errors
- protobuf key is not supported
- empty payload with non-empty key
- decode utf8 error: {0}
- Parquet parser error: {message}
- {0}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/6449467a72e7afe0.
Report an issue: GitHub.