apache/druid · error · org.apache.druid.java.util.common.parsers.ParseException
Size of rawColumnsList([%s]) does not correspond to size of
Error message
Size of rawColumnsList([%s]) does not correspond to size of inputRows([%s])
What it means
InputRowListPlusRawValues.ofList pairs raw parsed column values with the InputRows produced for them. When both lists are non-null but their sizes differ, Druid throws a ParseException because the two lists are meant to be index-aligned; the pairing invariant would be broken. This is an internal consistency check in the parser/parsing-failure reporting path.
Source
Thrown at processing/src/main/java/org/apache/druid/data/input/InputRowListPlusRawValues.java:98
* Make sure the size of given rawColumnsList and inputRows are the same if both of them are not null
*/
public static InputRowListPlusRawValues ofList(@Nullable List<Map<String, Object>> rawColumnsList,
@Nullable List<InputRow> inputRows)
{
return ofList(rawColumnsList, inputRows, null);
}
/**
* Create an instance of {@link InputRowListPlusRawValues}
*
* Make sure the size of given rawColumnsList and inputRows are the same if both of them are not null
*/
public static InputRowListPlusRawValues ofList(@Nullable List<Map<String, Object>> rawColumnsList,
@Nullable List<InputRow> inputRows,
@Nullable ParseException parseException)
{
if (rawColumnsList != null && inputRows != null && rawColumnsList.size() != inputRows.size()) {
throw new ParseException(null, "Size of rawColumnsList([%s]) does not correspond to size of inputRows([%s])", rawColumnsList, inputRows);
}
return new InputRowListPlusRawValues(
inputRows,
rawColumnsList,
parseException
);
}
private InputRowListPlusRawValues(
@Nullable List<InputRow> inputRows,
@Nullable List<Map<String, Object>> rawValues,
@Nullable ParseException parseException
)
{
this.inputRows = inputRows;
this.rawValues = rawValues;
this.parseException = parseException;View on GitHub (pinned to 9b90983fd2)
Solutions
- Fix the parser so exactly one InputRow is produced per raw-column map (or drop the corresponding raw map when a row is skipped).
- Pass null for rawColumnsList if raw values are unavailable and cannot be kept aligned with rows.
- Pass null for inputRows if only raw values plus an exception are being reported.
- Add an assertion/log in the parser when a row is discarded to catch misalignment early.
Example fix
// before
List<InputRow> rows = rawList.stream().map(this::tryParse).filter(Objects::nonNull).collect(Collectors.toList());
return InputRowListPlusRawValues.ofList(rawList, rows, null);
// after
List<InputRow> rows = new ArrayList<>();
for (Map<String, Object> raw : rawList) { rows.add(tryParseOrPlaceholder(raw)); }
return InputRowListPlusRawValues.ofList(rawList, rows, null); Defensive patterns
Strategy: type-guard
Validate before calling
assert rawColumnsList == null || inputRows == null || rawColumnsList.size() == inputRows.size();
Type guard
boolean safe = (rawColumnsList == null || inputRows == null || rawColumnsList.size() == inputRows.size());
if (!safe) {
log.warn("rawColumnsList size %d != inputRows size %d; omitting raw values", rawColumnsList.size(), inputRows.size());
rawColumnsList = null;
} Prevention
- Keep raw-map collection and row creation in the same loop so sizes stay aligned
- Add unit tests for parsers that drop invalid rows
- Pass null instead of a misaligned list
When it happens
Trigger: Calling InputRowListPlusRawValues.ofList(rawColumnsList, inputRows, parseException) with rawColumnsList != null && inputRows != null && rawColumnsList.size() != inputRows.size(), e.g. a custom parser that collects raw maps but drops or adds rows during InputRow creation.
Common situations: Custom or plugin InputParser implementations that filter out invalid rows from inputRows but still return raw maps for them (or vice versa); version drift between intermediate parsing stages during ingestion fault diagnostics.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Unable to parse row [%s]
- Unhandled type: %s
- ColumnCapacityExceededException
- Both union and sketch were null!
- Bloom filter aggregators are query-time only
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/ee2633dd60360bc7.
Report an issue: GitHub.