apache/flink · error · CsvParseException
Unable to deserialize byte array.
Error message
Unable to deserialize byte array.
What it means
Error "Unable to deserialize byte array." thrown in apache/flink.
Source
Thrown at flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvToRowDataConverters.java:279
return mills;
};
}
private TimestampData convertToTimestamp(
JsonNode jsonNode, DateTimeFormatter dateTimeFormatter) {
return TimestampData.fromLocalDateTime(
LocalDateTime.parse(jsonNode.asText().trim(), dateTimeFormatter));
}
private StringData convertToString(JsonNode jsonNode) {
return StringData.fromString(jsonNode.asText());
}
private byte[] convertToBytes(JsonNode jsonNode) {
try {
return jsonNode.binaryValue();
} catch (IOException e) {
throw new CsvParseException("Unable to deserialize byte array.", e);
}
}
private CsvToRowDataConverter createDecimalConverter(DecimalType decimalType) {
final int precision = decimalType.getPrecision();
final int scale = decimalType.getScale();
return jsonNode -> {
BigDecimal bigDecimal;
if (jsonNode.isBigDecimal()) {
bigDecimal = jsonNode.decimalValue();
} else {
bigDecimal = new BigDecimal(jsonNode.asText());
}
return DecimalData.fromBigDecimal(bigDecimal, precision, scale);
};
}
private CsvToRowDataConverter createArrayConverter(ArrayType arrayType) {View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Unable to deserialize byte array.
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Unable to deserialize byte array.") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Unable to deserialize byte array.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Unable to deserialize byte array.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/6dd8c98946944d0a.
Report an issue: GitHub.