{"record":{"id":"77b9aa6f3f593d9b","repo":"apache/flink","slug":"expecting-more-rows-but-reached-last-block-read","errorCode":null,"errorMessage":"expecting more rows but reached last block. Read {} out of {}","messagePattern":"expecting more rows but reached last block\\. Read (.+?) out of (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/ParquetVectorizedInputFormat.java","lineNumber":424,"sourceCode":"\n            int num = (int) Math.min(batchSize, totalCountLoadedSoFar - rowsReturned);\n            for (int i = 0; i < columnReaders.length; ++i) {\n                if (columnReaders[i] == null) {\n                    batch.writableVectors[i].fillWithNulls();\n                } else {\n                    //noinspection unchecked\n                    columnReaders[i].readToVector(num, batch.writableVectors[i]);\n                }\n            }\n            rowsReturned += num;\n            batch.columnarBatch.setNumRows(num);\n            return true;\n        }\n\n        private void readNextRowGroup() throws IOException {\n            PageReadStore pages = reader.readNextRowGroup();\n            if (pages == null) {\n                throw new IOException(\n                        \"expecting more rows but reached last block. Read \"\n                                + rowsReturned\n                                + \" out of \"\n                                + totalRowCount);\n            }\n\n            List<Type> types = requestedSchema.getFields();\n            columnReaders = new ColumnReader[types.size()];\n            for (int i = 0; i < types.size(); ++i) {\n                if (!unknownFieldsIndices.contains(i)) {\n                    columnReaders[i] =\n                            createColumnReader(\n                                    isUtcTimestamp,\n                                    projectedTypes[i],\n                                    types.get(i),\n                                    requestedSchema.getColumns(),\n                                    pages,\n                                    fields.get(i),","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/ParquetVectorizedInputFormat.java#L406-L442","documentation":"Error \"expecting more rows but reached last block. Read {} out of {}\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: expecting more rows but reached last block. Read the reported value out of the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: expecting more rows but reached last block. Read the reported value out of the reported value.","solutions":["Address the cause reported by the error message: expecting more rows but reached last block. Read the reported value out of the reported value","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"expecting more rows but reached last block. Read the reported value out of 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"}