apache/beam · error · UnsupportedOperationException
Converting %s to Beam schema type is not supported
Error message
Converting %s to Beam schema type is not supported
What it means
SingleStoreDefaultRowMapper's ResultSetFieldConverter.of(...) maps each SingleStore column type to a Beam Schema.FieldType converter. Column types not covered by the switch (anything outside the supported VARCHAR/CHAR/numeric/date/NULL set) hit the default branch and throw UnsupportedOperationException, because there is no defined Beam schema representation for them.
Source
Thrown at sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/SingleStoreDefaultRowMapper.java:176
Schema.FieldType.DECIMAL, ResultSet::getBigDecimal);
case TIMESTAMP:
return new TimestampResultSetFieldConverter();
case DATE:
return new DateResultSetFieldConverter();
case TIME:
return new TimeResultSetFieldConverter();
case LONGVARBINARY:
case VARBINARY:
case BINARY:
return new BinaryResultSetFieldConverter();
case LONGVARCHAR:
case VARCHAR:
case CHAR:
return new CharResultSetFieldConverter();
case NULL:
return new DirectResultSetFieldConverter(STRING, ResultSet::getString);
default:
throw new UnsupportedOperationException(
"Converting " + columnType + " to Beam schema type is not supported");
}
}
}
static class DirectResultSetFieldConverter extends ResultSetFieldConverter {
Schema.FieldType fieldType;
ResultSetFieldExtractor extractor;
public DirectResultSetFieldConverter(
Schema.FieldType fieldType, ResultSetFieldExtractor extractor) {
this.fieldType = fieldType;
this.extractor = extractor;
}
@Override
@Nullable Object getValue(ResultSet rs, Integer index) throws SQLException {
return extractor.extract(rs, index);View on GitHub (pinned to 12126d8942)
Solutions
- Exclude the unsupported column from the read query (select only supported columns)
- Implement a custom UserDataMapper/row mapper that converts the column to a supported Beam type (e.g. read as STRING)
- Cast the column to a supported type in the SQL query (e.g. CAST(col AS CHAR))
- File/patch the IO to add a converter case for the column type
Example fix
// before
statement.apply("SELECT * FROM t"); // table has JSON column -> throws
// after
statement.apply("SELECT id, name, CAST(extra AS CHAR) AS extra FROM t"); Defensive patterns
Strategy: validation
Validate before calling
Set<String> unsupported = tableColumns.stream().map(c -> c.getType()).filter(t -> !SUPPORTED_TYPES.contains(t)).collect(toSet()); if (!unsupported.isEmpty()) { /* exclude or cast these columns */ } Try / catch
try { pipeline.apply(SingleStoreIO.read()...); } catch (UnsupportedOperationException e) { if (e.getMessage().contains("to Beam schema type is not supported")) { /* narrow SELECT column list */ } throw e; } Prevention
- Inspect table DDL (SHOW COLUMNS) before building reads; avoid SELECT * on tables with JSON/GEOMETRY/BIT columns
- Cast unsupported columns to CHAR in SQL
- Keep the Beam SingleStore IO dependency current so newly added server types are mapped
When it happens
Trigger: Reading from a SingleStore table containing a column whose java.sql.Type/SingleStore type falls through the switch in of(), e.g. exotic or JSON/GEOMETRY/BIT types not handled, during schema inference in SingleStoreIO.read().
Common situations: Tables with JSON, GEOMETRY, or other semi-structured SingleStore column types; newer SingleStore server versions introducing types the connector/IO doesn't map yet; schema drift after a table ALTER adds an unsupported column.
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
- Unsupported Beam type: {typeName}
- Writing of ARRAY type is not supported by the default UserDa
- Writing of ITERABLE type is not supported by the default Use
- Unable to generate coder for schema {schema}
- Expecting exactly one field, found
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/aa0e462e44d62d7a.
Report an issue: GitHub.