apache/druid · error · UnsupportedOperationException
Column is not multi-valued
Error message
Column is not multi-valued
What it means
StringUtf8DictionaryEncodedColumn.getMultiValueRow() returns the multi-valued row (IndexedInts of dictionary ids) for a given row number. It throws UnsupportedOperationException when the underlying column does not have multiple values, because the multiValueColumn delegate does not exist in that case.
Source
Thrown at processing/src/main/java/org/apache/druid/segment/column/StringUtf8DictionaryEncodedColumn.java:114
}
@Override
public boolean hasMultipleValues()
{
return column == null;
}
@Override
public int getSingleValueRow(int rowNum)
{
return column.get(rowNum);
}
@Override
public IndexedInts getMultiValueRow(int rowNum)
{
if (!hasMultipleValues()) {
throw new UnsupportedOperationException("Column is not multi-valued");
}
return multiValueColumn.get(rowNum);
}
@Override
@Nullable
public String lookupName(int id)
{
final ByteBuffer buffer = utf8Dictionary.get(id);
if (buffer == null) {
return null;
}
return StringUtils.fromUtf8(buffer);
}
@Override
public int lookupId(String name)
{View on GitHub (pinned to 9b90983fd2)
Solutions
- Check column.hasMultipleValues() (or ColumnCapabilities.hasMultipleValues()) before calling getMultiValueRow
- Use getSingleValueRow(int) for single-valued columns
- Ensure the ingestion spec keeps the column multi-valued (e.g. input is a JSON array) if multi-valued semantics are required
Example fix
// before
IndexedInts row = column.getMultiValueRow(rowNum);
// after
IndexedInts row = column.hasMultipleValues()
? column.getMultiValueRow(rowNum)
: IndexibleInts.of(column.getSingleValueRow(rowNum)); Defensive patterns
Strategy: validation
Validate before calling
if (column.hasMultipleValues()) { row = column.getMultiValueRow(rowNum); } else { row = IndexibleInts.wrap(column.getSingleValueRow(rowNum)); } Type guard
boolean isMultiValued(DimensionHandler h, ColumnCapabilities caps) { return caps != null && caps.hasMultipleValues(); } Try / catch
try { return column.getMultiValueRow(rowNum); } catch (UnsupportedOperationException e) { return column.getSingleValueRowWrapped(rowNum); } Prevention
- Check ColumnCapabilities.hasMultipleValues() before multi-value APIs
- Keep ingestion schemas consistent so column arity does not change across segments
- Prefer capability-driven selector factories over direct column access
When it happens
Trigger: Calling getMultiValueRow(rowNum) on a single-valued String column (one where hasMultipleValues() returns false), e.g. a column stored with plain single-value encoding.
Common situations: Generic query/segment code that assumes all string columns are multi-valued; schema changes that converted a column from multi-valued to single-valued; tests or tools written against multi-valued fixtures applied to single-valued segments.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Not a numeric value type:
- Reverse lookup not allowed.
- Serialization not supported here
- Map column doesn't support getRow()
- Map column doesn't support lookupName()
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/0ecc33efca13c4e1.
Report an issue: GitHub.