{"record":{"id":"7ad9ce13fb6ecf6b","repo":"apache/druid","slug":"unknown-type-s-7ad9ce","errorCode":null,"errorMessage":"Unknown type[%s]","messagePattern":"Unknown type\\[(.+?)\\]","errorType":"exception","errorClass":"ResourceLimitException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultSortedMatrixMaker.java","lineNumber":188,"sourceCode":"                if (row.isNull(i)) {\n                  result = searcher.findNull(start, end);\n                } else {\n                  result = searcher.findLong(start, end, row.getLong(i));\n                }\n                break;\n              case DOUBLE:\n                result = searcher.findDouble(start, end, row.getDouble(i));\n                break;\n              case FLOAT:\n                result = searcher.findFloat(start, end, row.getFloat(i));\n                break;\n\n              case ARRAY:\n              case COMPLEX:\n                result = searcher.findComplex(start, end, row.getObject(i));\n                break;\n              default:\n                throw new RE(\"Unknown type[%s]\", searcher.getType());\n            }\n          }\n\n          if (result.wasFound()) {\n            start = result.getStartRow();\n            end = result.getEndRow();\n          } else {\n            return FindResult.notFound(result.getNext());\n          }\n        }\n\n        return FindResult.found(start, end);\n      }\n    };\n  }\n}\n","sourceCodeStart":170,"sourceCodeEnd":205,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultSortedMatrixMaker.java#L170-L205","documentation":"DefaultSortedMatrixMaker.findRow binary-searches a sorted matrix for a row by comparing each column via a searcher; the searcher's declared type must be one of the handled cases (string-like, numeric, ARRAY, COMPLEX, etc.). An unrecognized ColumnType falls into default and throws RE. This happens when a column's type has no binary-search implementation.","triggerScenarios":"A column in the sorted matrix has a type (per searcher.getType()) that the switch in findRow does not handle, commonly exotic/complex column types.","commonSituations":"New or extension-provided column types used in GROUP BY/matrix contexts; schema type mismatch where a column resolved to an unexpected type.","solutions":["Use a supported column type (long, double, float, string, array, complex) for the involved columns","Check the actual column type in the segment schema and cast if needed","Upgrade Druid — newer versions handle more types"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"switch (columnType) {\n  case STRING: case LONG: case DOUBLE: case FLOAT:\n  case ARRAY: case COMPLEX: break;\n  default:\n    throw new IllegalArgumentException(\"unsupported type for sorted matrix: \" + columnType);\n}","typeGuard":null,"tryCatchPattern":"try {\n  matrix = maker.make();\n} catch (ResourceLimitException | RuntimeException e) {\n  if (e.getMessage().startsWith(\"Unknown type\")) {\n    // cast or exclude the offending column\n    matrix = maker.withColumnRemoved(offendingColumn).make();\n  } else throw e;\n}","preventionTips":["Check segment column types before building sorted matrices","Cast exotic column types to supported ones in the query"],"tags":["column-type","binary-search","unsupported-dtype"],"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"}