{"record":{"id":"aa0e462e44d62d7a","repo":"apache/beam","slug":"converting-s-to-beam-schema-type-is-not-supported","errorCode":null,"errorMessage":"Converting %s to Beam schema type is not supported","messagePattern":"Converting (.+?) to Beam schema type is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/SingleStoreDefaultRowMapper.java","lineNumber":176,"sourceCode":"              Schema.FieldType.DECIMAL, ResultSet::getBigDecimal);\n        case TIMESTAMP:\n          return new TimestampResultSetFieldConverter();\n        case DATE:\n          return new DateResultSetFieldConverter();\n        case TIME:\n          return new TimeResultSetFieldConverter();\n        case LONGVARBINARY:\n        case VARBINARY:\n        case BINARY:\n          return new BinaryResultSetFieldConverter();\n        case LONGVARCHAR:\n        case VARCHAR:\n        case CHAR:\n          return new CharResultSetFieldConverter();\n        case NULL:\n          return new DirectResultSetFieldConverter(STRING, ResultSet::getString);\n        default:\n          throw new UnsupportedOperationException(\n              \"Converting \" + columnType + \" to Beam schema type is not supported\");\n      }\n    }\n  }\n\n  static class DirectResultSetFieldConverter extends ResultSetFieldConverter {\n    Schema.FieldType fieldType;\n    ResultSetFieldExtractor extractor;\n\n    public DirectResultSetFieldConverter(\n        Schema.FieldType fieldType, ResultSetFieldExtractor extractor) {\n      this.fieldType = fieldType;\n      this.extractor = extractor;\n    }\n\n    @Override\n    @Nullable Object getValue(ResultSet rs, Integer index) throws SQLException {\n      return extractor.extract(rs, index);","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/SingleStoreDefaultRowMapper.java#L158-L194","documentation":"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.","triggerScenarios":"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().","commonSituations":"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.","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"],"exampleFix":"// before\nstatement.apply(\"SELECT * FROM t\"); // table has JSON column -> throws\n// after\nstatement.apply(\"SELECT id, name, CAST(extra AS CHAR) AS extra FROM t\");","handlingStrategy":"validation","validationCode":"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 */ }","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["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"],"tags":["java","beam","singlestore","schema","unsupported-type"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}