{"record":{"id":"dc99e610df9145d7","repo":"apache/druid","slug":"unsupported-nested-array-type-s","errorCode":null,"errorMessage":"Unsupported nested array type: [%s]","messagePattern":"Unsupported nested array type: \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/FieldTypeInfo.java","lineNumber":316,"sourceCode":"        types |= LONG_MASK;\n        break;\n      case DOUBLE:\n        types |= DOUBLE_MASK;\n        break;\n      case ARRAY:\n        Preconditions.checkNotNull(type.getElementType(), \"ElementType must not be null\");\n        switch (type.getElementType().getType()) {\n          case STRING:\n            types |= STRING_ARRAY_MASK;\n            break;\n          case LONG:\n            types |= LONG_ARRAY_MASK;\n            break;\n          case DOUBLE:\n            types |= DOUBLE_ARRAY_MASK;\n            break;\n          default:\n            throw new ISE(\"Unsupported nested array type: [%s]\", type.asTypeString());\n        }\n        break;\n      default:\n        throw new ISE(\"Unsupported nested type: [%s]\", type.asTypeString());\n    }\n    return types;\n  }\n\n  public static Set<ColumnType> convertToSet(byte types)\n  {\n    final Set<ColumnType> theTypes = Sets.newHashSetWithExpectedSize(4);\n    if ((types & STRING_MASK) > 0) {\n      theTypes.add(ColumnType.STRING);\n    }\n    if ((types & LONG_MASK) > 0) {\n      theTypes.add(ColumnType.LONG);\n    }\n    if ((types & DOUBLE_MASK) > 0) {","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/FieldTypeInfo.java#L298-L334","documentation":"FieldTypeInfo.add maps a nested value type to its array-type bitmask; only STRING/LONG/DOUBLE (and their ARRAY forms) are supported. Encountering an array of an unsupported type (e.g. complex/array-of-arrays beyond supported set) in the default branch throws ISE 'Unsupported nested array type'.","triggerScenarios":"Collecting field type info while ingesting nested data when an array element's ValueType falls through the switch's default case — e.g. nested arrays, arrays of complex objects, or future/unknown types.","commonSituations":"Ingesting JSON with arrays containing objects/arrays into a nested column on a Druid version without support for that array type; type inference producing unexpected ValueType from user data.","solutions":["Flatten or remove nested-of-nested arrays in the input data before ingestion","Cast array elements to supported scalar types (string/long/double) during ingestion","Upgrade to a Druid version supporting the desired nested array type","Guard the ingestion spec with transforms/filtered aggregations that skip unsupported array types"],"exampleFix":"// before\n// input: {\"tags\": [[\"a\",\"b\"], [\"c\"]]} // array of arrays\n// after\n// transform to flat array\n\"transforms\": [{\"type\": \"expression\", \"name\": \"tags\", \"expression\": \"array_concat(tag0, tag1)\"}]","handlingStrategy":"validation","validationCode":"for (Object v : list) { ValueType t = ValueType.fromRawType(v); if (!(t == ValueType.STRING || t == ValueType.LONG || t == ValueType.DOUBLE)) throw new IllegalArgumentException(\"Unsupported array element type \" + t); }","typeGuard":"boolean supportedArrayType(Object v) { return v instanceof List && !((List<?>) v).isEmpty() && (v.toString().startsWith(\"[\") ) && !firstElementIsComplex((List<?>) v); }","tryCatchPattern":"try { types = fieldTypeInfo.add(type, types); } catch (ISE e) { log.warn(\"Skipping unsupported nested array type: %s\", e.getMessage()); return nullTypeMask(); }","preventionTips":["Normalize/flatten nested arrays in ingestion transforms","Use filters or casts to keep array element types scalar","Test ingestion specs against sample data containing complex arrays"],"tags":["nested-column","type-system","unsupported-operation"],"backgroundTag":"unsupported-dtype","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}