OtterMind/Chat2DB · error · IllegalArgumentException
Missing JDBC type name for Kylin ARRAY column: {name}
Error message
Missing JDBC type name for Kylin ARRAY column: {name} What it means
Thrown by KylinMetaData.renderArrayType when a column whose JDBC type is ARRAY has a blank columnType (the JDBC type name string). The ARRAY element type is derived from the type-name text, so a blank name leaves no way to render ARRAY<...>.
Source
Thrown at chat2db-community-server/chat2db-community-plugins/chat2db-community-kylin/src/main/java/ai/chat2db/plugin/kylin/KylinMetaData.java:122
Integer columnSize = column.getColumnSize();
if (StringUtils.equalsAny(typeName, "VARCHAR", "CHAR") && columnSize != null && columnSize > 0) {
return typeName + '(' + columnSize.toString() + ')';
}
if ("DECIMAL".equals(typeName) && columnSize != null && columnSize > 0) {
Integer decimalDigits = column.getDecimalDigits();
if (decimalDigits != null && decimalDigits >= 0) {
return typeName + '(' + columnSize.toString() + ',' + decimalDigits + ')';
}
return typeName + '(' + columnSize.toString() + ')';
}
return typeName;
}
private String renderArrayType(TableColumn column) {
String jdbcTypeName = column.getColumnType();
if (StringUtils.isBlank(jdbcTypeName)) {
throw new IllegalArgumentException("Missing JDBC type name for Kylin ARRAY column: " + column.getName());
}
Matcher matcher = ARRAY_TYPE_NAME_PATTERN.matcher(jdbcTypeName);
if (!matcher.matches()) {
throw new IllegalArgumentException("Unsupported Kylin JDBC ARRAY type for column: " + column.getName());
}
String elementType = matcher.group(1)
.replace(" ", "")
.replace("\t", "")
.toUpperCase(Locale.ROOT);
return "ARRAY<" + elementType + '>';
}
private String buildCreateIndex(String tableName, TableIndex index) {
if (StringUtils.isBlank(index.getName()) || index.getColumnList() == null || index.getColumnList().isEmpty()) {
return "";
}
View on GitHub (pinned to 5ee1e990e7)
Solutions
- Populate TableColumn.columnType (the JDBC TYPE_NAME) for any ARRAY column before generating DDL.
- Filter ARRAY columns that lack a type name and report them rather than aborting.
- Verify the Kylin JDBC driver returns TYPE_NAME for array columns; upgrade if needed.
Example fix
// before
TableColumn c = new TableColumn();
c.setDataType(Types.ARRAY); // columnType blank
kylinMetaData.tableDDL(...);
// after
TableColumn c = new TableColumn();
c.setDataType(Types.ARRAY);
c.setColumnType("INTEGER NOT NULL ARRAY"); // JDBC TYPE_NAME text Defensive patterns
Strategy: validation
Validate before calling
static boolean arrayColumnHasTypeName(TableColumn c) {
return c != null && c.getDataType() != null && c.getDataType() == Types.ARRAY
&& StringUtils.isNotBlank(c.getColumnType());
} Prevention
- Set TableColumn.columnType (JDBC TYPE_NAME) for all ARRAY columns.
- Filter ARRAY columns lacking a type name and report them.
- Verify the Kylin driver returns TYPE_NAME for array columns; upgrade if needed.
When it happens
Trigger: Generating Kylin DDL for a column with dataType == Types.ARRAY but columnType (TYPE_NAME) blank/null. Reached when the JDBC metadata reader did not return a TYPE_NAME for an array column.
Common situations: A Kylin driver version that omits TYPE_NAME for ARRAY columns; a manually built array column without setting columnType; metadata inconsistency between DATA_TYPE and TYPE_NAME.
Related errors
- Unsupported Kylin JDBC ARRAY type for column: {name}
- Missing JDBC type for Kylin column: {name}
- Unsupported Kylin JDBC column type: {jdbcType}
- Unsafe column type name from metadata: {typeName}
- Unsafe H2 column default from metadata: {columnDefault}
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/5868ce34789493eb.
Report an issue: GitHub.