{"record":{"id":"85e994efd0ebb4f2","repo":"apache/druid","slug":"unknown-column-type-s-for-column-s","errorCode":null,"errorMessage":"Unknown column type[%s] for column[%s].","messagePattern":"Unknown column type\\[(.+?)\\] for column\\[(.+?)\\]\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"processing/src/main/java/org/apache/druid/query/metadata/SegmentAnalyzer.java","lineNumber":152,"sourceCode":"            analysis = analyzeNumericColumn(capabilities, numRows, Double.BYTES);\n            break;\n          case STRING:\n            final BaseColumnHolder stringHolder = index != null ? index.getColumnHolder(columnName) : null;\n            if (stringHolder != null) {\n              analysis = analyzeStringColumn(capabilities, stringHolder);\n            } else {\n              analysis = analyzeStringColumn(capabilities, columnInspector, cursorFactory, columnName);\n            }\n            break;\n          case ARRAY:\n            analysis = analyzeArrayColumn(capabilities);\n            break;\n          case COMPLEX:\n            final BaseColumnHolder columnHolder = index != null ? index.getColumnHolder(columnName) : null;\n            analysis = analyzeComplexColumn(capabilities, numRows, columnHolder);\n            break;\n          default:\n            log.warn(\"Unknown column type[%s] for column[%s].\", capabilities.asTypeString(), columnName);\n            analysis = ColumnAnalysis.error(StringUtils.format(\"unknown_type_%s\", capabilities.asTypeString()));\n        }\n      }\n      catch (RuntimeException re) {\n        // eat the exception and add error analysis, this is preferrable to exploding since exploding results in\n        // the broker downstream SQL metadata cache left in a state where it is unable to completely finish\n        // the SQL schema relies on this stuff functioning, and so will continuously retry when it faces a failure\n        log.warn(re, \"Error analyzing column[%s] of type[%s]\", columnName, capabilities.asTypeString());\n        analysis = ColumnAnalysis.error(re.getMessage());\n      }\n\n      columns.put(columnName, analysis);\n    }\n\n    return columns;\n  }\n\n  public boolean analyzingSize()","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/query/metadata/SegmentAnalyzer.java#L134-L170","documentation":"SegmentAnalyzer.analyze encountered a column whose capabilities report a type it does not know how to analyze (not STRING, LONG, FLOAT, DOUBLE, or COMPLEX in the switch). It logs a warning and stores a ColumnAnalysis error 'unknown_type_<type>' rather than failing the metadata query.","triggerScenarios":"A column's ValueType in the switch statement hits the default branch, e.g. new/experimental value types (arrays, or types from extensions) that SegmentAnalyzer does not handle.","commonSituations":"Running an older broker/processing version against segments with newer column types (e.g. array-typed columns), or extension-provided complex types not supported by the metadata analyzer.","solutions":["Upgrade Druid so processing and the segment versions match (analyzer knows the new type)","Exclude that column from segmentMetadata analysis if stats are unnecessary","Re-ingest data converting the column to a supported type","Check capabilities.asTypeString() output to identify the unsupported type and its producer"],"exampleFix":"// before: analyze all columns including arrays\n// SegmentMetadataQuery with default analyzer\n// after: limit analyzed columns to supported types\n// query.setAnalyzersSpec(new AnalyzerSpec(ImmutableList.of(\"channel\"), ...))","handlingStrategy":"validation","validationCode":"if (capabilities.getType() not in (STRING, LONG, FLOAT, DOUBLE, COMPLEX)) skip analysis for this column;","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Upgrade processing to a version aware of new column types (e.g. arrays)","Restrict segmentMetadata AnalyzerSpec to supported columns","Align broker/processing versions across the cluster"],"tags":["metadata","segment","column-type"],"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"}