{"record":{"id":"ba1f31587d2997e7","repo":"apache/seatunnel","slug":"unsupported-data-type-ba1f31","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"data type in array is not supported: {}","messagePattern":"data type in array is not supported: (.+?)","errorType":"error_code","errorClass":"ClickhouseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/util/TypeConvertUtil.java","lineNumber":64,"sourceCode":"            SeaTunnelDataType<?> dataType = convert(subArrayDataType);\n            if (BasicType.INT_TYPE.equals(dataType)) {\n                return ArrayType.INT_ARRAY_TYPE;\n            } else if (BasicType.STRING_TYPE.equals(dataType)) {\n                return ArrayType.STRING_ARRAY_TYPE;\n            } else if (BasicType.FLOAT_TYPE.equals(dataType)) {\n                return ArrayType.FLOAT_ARRAY_TYPE;\n            } else if (BasicType.DOUBLE_TYPE.equals(dataType)) {\n                return ArrayType.DOUBLE_ARRAY_TYPE;\n            } else if (BasicType.LONG_TYPE.equals(dataType)) {\n                return ArrayType.LONG_ARRAY_TYPE;\n            } else if (BasicType.SHORT_TYPE.equals(dataType)) {\n                return ArrayType.SHORT_ARRAY_TYPE;\n            } else if (BasicType.BOOLEAN_TYPE.equals(dataType)) {\n                return ArrayType.BOOLEAN_ARRAY_TYPE;\n            } else if (BasicType.BYTE_TYPE.equals(dataType)) {\n                return ArrayType.BYTE_ARRAY_TYPE;\n            } else {\n                throw new ClickhouseConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                        \"data type in array is not supported: \" + subArrayDataType.getDataType());\n            }\n        }\n        Class<?> type = column.getDataType().getObjectClass();\n        if (Integer.class.equals(type)) {\n            return BasicType.INT_TYPE;\n        } else if (Long.class.equals(type)) {\n            return BasicType.LONG_TYPE;\n        } else if (Short.class.equals(type)) {\n            return BasicType.SHORT_TYPE;\n        } else if (Byte.class.equals(type)) {\n            return BasicType.BYTE_TYPE;\n        } else if (Boolean.class.equals(type)) {\n            return BasicType.BOOLEAN_TYPE;\n        } else if (LocalDate.class.equals(type)) {\n            return LocalTimeType.LOCAL_DATE_TYPE;\n        } else if (LocalDateTime.class.equals(type)) {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/util/TypeConvertUtil.java#L46-L82","documentation":"TypeConvertUtil.convert maps ClickHouse column types to SeaTunnel types; when the column is an array whose element type is not one of the supported primitives (INT, LONG, FLOAT, DOUBLE, SHORT, BOOLEAN, BYTE), it throws UNSUPPORTED_DATA_TYPE. Arrays of strings, decimals, dates, or nested arrays are not convertible by this utility.","triggerScenarios":"Reading a ClickHouse column like Array(String), Array(Decimal), Array(Date), or Array(Array(Int)) where the element type has no BasicType mapping in TypeConvertUtil.convert.","commonSituations":"ClickHouse tables using Array(String) — very common — being read with this connector version; nested array columns; schema discovered from the table includes an array column the reader can't map.","solutions":["Exclude the unsupported array column from the read schema (select only supported columns).","Cast the column to a supported type in ClickHouse (e.g. materialize Array(String) via arrayJoin or read as a single string) or change the table schema.","Upgrade SeaTunnel to a version whose TypeConvertUtil supports the element type (String arrays and more were added in later releases).","Implement a custom conversion by extending the connector if the data is essential."],"exampleFix":"// before\nschema = { columns = { tags = \"array<string>\" } }  // Array(String) unsupported here\n// after\nschema = { columns = { tags_joined = \"string\" } }  // read arrayToString(tags) or drop the column","handlingStrategy":"validation","validationCode":"// ensure every array column's element type is a supported primitive before reading\nschema.getColumns().forEach(col -> {\n    if (isClickhouseArray(col) && !SUPPORTED_ELEMENT_TYPES.contains(elementTypeOf(col))) {\n        throw new IllegalArgumentException(\"unsupported array element: \" + col);\n    }\n});","typeGuard":null,"tryCatchPattern":"try {\n    SeaTunnelDataType<?> t = TypeConvertUtil.convert(column);\n} catch (ClickhouseConnectorException e) {\n    LOG.warn(\"skipping column with unsupported array element type\");\n    columns.remove(column); // fallback: drop the column\n}","preventionTips":["Avoid Array(<non-numeric-primitive>) columns in tables read by this connector, or cast them at query time.","Check the connector docs' supported-type matrix before modeling array columns.","Prefer flattening arrays with arrayJoin into supported scalar types."],"tags":["clickhouse","type-conversion","array","unsupported-type"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}