apache/flink · error · IndexOutOfBoundsException
%s for range [0..%s]
Error message
%s for range [0..%s]
What it means
Error "%s for range [0..%s]" thrown in apache/flink.
Source
Thrown at flink-core/src/main/java/org/apache/flink/types/Record.java:224
/**
* Gets the field at the given position from the record. This method checks internally, if this
* instance of the record has previously returned a value for this field. If so, it reuses the
* object, if not, it creates one from the supplied class.
*
* @param <T> The type of the field.
* @param fieldNum The logical position of the field.
* @param type The type of the field as a class. This class is used to instantiate a value
* object, if none had previously been instantiated.
* @return The field at the given position, or null, if the field was null.
* @throws IndexOutOfBoundsException Thrown, if the field number is negative or larger or equal
* to the number of fields in this record.
*/
@SuppressWarnings("unchecked")
public <T extends Value> T getField(final int fieldNum, final Class<T> type) {
// range check
if (fieldNum < 0 || fieldNum >= this.numFields) {
throw new IndexOutOfBoundsException(
fieldNum + " for range [0.." + (this.numFields - 1) + "]");
}
// get offset and check for null
final int offset = this.offsets[fieldNum];
if (offset == NULL_INDICATOR_OFFSET) {
return null;
} else if (offset == MODIFIED_INDICATOR_OFFSET) {
// value that has been set is new or modified
return (T) this.writeFields[fieldNum];
}
final int limit = offset + this.lengths[fieldNum];
// get an instance, either from the instance cache or create a new one
final Value oldField = this.readFields[fieldNum];
final T field;
if (oldField != null && oldField.getClass() == type) {View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: the reported value for range [0..the reported value]
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("the reported value for range [0..the reported value]") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: the reported value for range [0..the reported value].
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: the reported value for range [0..the reported value].
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/f73445e17efbc481.
Report an issue: GitHub.