{"record":{"id":"5207add7129f6e89","repo":"apache/beam","slug":"unsupported-type","errorCode":null,"errorMessage":"Unsupported type: ","messagePattern":"Unsupported type: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java","lineNumber":451,"sourceCode":"        case ENUM16:\n        case ENUM8:\n        case FIXEDSTRING:\n        case STRING:\n          return value;\n        case UINT8:\n          return Short.valueOf(value);\n        case UINT16:\n          return Integer.valueOf(value);\n        case UINT32:\n          return Long.valueOf(value);\n        case UINT64:\n          return Long.valueOf(value);\n        case BOOL:\n          return Boolean.valueOf(value);\n        case DECIMAL:\n          return new BigDecimal(value);\n        default:\n          throw new UnsupportedOperationException(\"Unsupported type: \" + columnType);\n      }\n    }\n\n    abstract Builder toBuilder();\n\n    public static Builder builder() {\n      return new AutoValue_TableSchema_ColumnType.Builder();\n    }\n\n    @AutoValue.Builder\n    abstract static class Builder {\n\n      public abstract Builder typeName(TypeName typeName);\n\n      public abstract Builder arrayElementType(ColumnType arrayElementType);\n\n      public abstract Builder nullable(boolean nullable);\n","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java#L433-L469","documentation":"TableSchema.parseDefaultExpression evaluates a column's DEFAULT/MATERIALIZED expression and converts the literal result to a Java value based on the column's TypeName. If the column type has no conversion case in this switch, it throws UnsupportedOperationException(\"Unsupported type: \" + columnType), meaning defaults for that type are not implemented.","triggerScenarios":"Parsing a schema whose column with a default expression has a TypeName not handled by the switch (e.g. ARRAY, MAP, STRUCT/TUPLE, or other complex types) — only numeric, string, bool, and decimal cases are implemented.","commonSituations":"Schemas containing DEFAULT expressions on composite types like Array(String) or Map(...), or newly added ClickHouse types that the Beam ClickHouse connector's default-expression support has not caught up with.","solutions":["Remove the DEFAULT expression from the unsupported column in the schema, or set the default client-side/in the table DDL instead.","Add a case for the needed TypeName in parseDefaultExpression and contribute/patch the connector.","Handle UnsupportedOperationException when calling parse() on schemas that may contain such columns and skip default materialization for them."],"exampleFix":"// before\n// schema: \"tags Array(String) DEFAULT []\" -> Unsupported type: ARRAY(Array...)\n// after\n// schema: \"tags Array(String)\" // no default expression","handlingStrategy":"try-catch","validationCode":"if (column.getDefaultExpression() != null &&\n    Set.of(\"ARRAY\",\"MAP\",\"TUPLE\",\"STRUCT\",\"IPV4\",\"IPV6\",\"UUID\",\"ENUM\")\n       .contains(column.getType().getTypeName().name())) {\n  throw new IllegalStateException(\"default expressions unsupported for \" + column.getType().getTypeName());\n}","typeGuard":null,"tryCatchPattern":"try {\n  schema = TableSchema.parse(str);\n} catch (IllegalArgumentException | UnsupportedOperationException e) {\n  // strip DEFAULT expressions from unsupported columns and retry, or skip defaults\n}","preventionTips":["Avoid DEFAULT expressions on array/map/tuple columns when using the connector.","Keep defaults in the ClickHouse table DDL rather than the parsed schema string.","Check the connector version for supported default-expression types."],"tags":["clickhouse","schema","unsupported-type","default-expression"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}