{"record":{"id":"f73445e17efbc481","repo":"apache/flink","slug":"s-for-range-0-s","errorCode":null,"errorMessage":"%s for range [0..%s]","messagePattern":"(.+?) for range \\[0\\.\\.(.+?)\\]","errorType":"exception","errorClass":"IndexOutOfBoundsException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/types/Record.java","lineNumber":224,"sourceCode":"\n    /**\n     * Gets the field at the given position from the record. This method checks internally, if this\n     * instance of the record has previously returned a value for this field. If so, it reuses the\n     * object, if not, it creates one from the supplied class.\n     *\n     * @param <T> The type of the field.\n     * @param fieldNum The logical position of the field.\n     * @param type The type of the field as a class. This class is used to instantiate a value\n     *     object, if none had previously been instantiated.\n     * @return The field at the given position, or null, if the field was null.\n     * @throws IndexOutOfBoundsException Thrown, if the field number is negative or larger or equal\n     *     to the number of fields in this record.\n     */\n    @SuppressWarnings(\"unchecked\")\n    public <T extends Value> T getField(final int fieldNum, final Class<T> type) {\n        // range check\n        if (fieldNum < 0 || fieldNum >= this.numFields) {\n            throw new IndexOutOfBoundsException(\n                    fieldNum + \" for range [0..\" + (this.numFields - 1) + \"]\");\n        }\n\n        // get offset and check for null\n        final int offset = this.offsets[fieldNum];\n        if (offset == NULL_INDICATOR_OFFSET) {\n            return null;\n        } else if (offset == MODIFIED_INDICATOR_OFFSET) {\n            // value that has been set is new or modified\n            return (T) this.writeFields[fieldNum];\n        }\n\n        final int limit = offset + this.lengths[fieldNum];\n\n        // get an instance, either from the instance cache or create a new one\n        final Value oldField = this.readFields[fieldNum];\n        final T field;\n        if (oldField != null && oldField.getClass() == type) {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/types/Record.java#L206-L242","documentation":"Error \"%s for range [0..%s]\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: the reported value for range [0..the reported value].","commonSituations":"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].","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."],"exampleFix":"Correct the condition described (\"the reported value for range [0..the reported value]\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}