{"record":{"id":"eee5f718efe882ea","repo":"prestodb/presto","slug":"unsupported-frame-type","errorCode":null,"errorMessage":"Unsupported frame type: ","messagePattern":"Unsupported frame type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/operator/window/WindowPartition.java","lineNumber":276,"sourceCode":"                if (emptyFrame(range)) {\n                    recentRanges.put(functionIndex, nearestValidFrame(range));\n                    return new Range(-1, -1);\n                }\n                recentRanges.put(functionIndex, range);\n                return range;\n            case ROWS:\n                return getFrameRange(frameInfo);\n            case GROUPS:\n                GroupsFrame frame = getFrameRange(frameInfo, recentGroupsFrames.get(functionIndex));\n                // handle empty frame. If the frame is out of partition bounds, record the nearest valid frame as the 'recentFrame' for the next row.\n                if (emptyFrame(frame.getRange())) {\n                    recentGroupsFrames.put(functionIndex, nearestValidFrame(frame));\n                    return new Range(-1, -1);\n                }\n                recentGroupsFrames.put(functionIndex, frame);\n                return frame.getRange();\n            default:\n                throw new IllegalArgumentException(\"Unsupported frame type: \" + frameInfo.getType());\n        }\n    }\n\n    private Range getFrameRange(FrameInfo frameInfo)\n    {\n        int rowPosition = currentPosition - partitionStart;\n        int endPosition = partitionEnd - partitionStart - 1;\n\n        // handle empty frame\n        if (emptyFrame(frameInfo, rowPosition, endPosition)) {\n            return new Range(-1, -1);\n        }\n\n        int frameStart;\n        int frameEnd;\n\n        // frame start\n        if (frameInfo.getStartType() == UNBOUNDED_PRECEDING) {","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/window/WindowPartition.java#L258-L294","documentation":"WindowPartition computes frame extents per window function based on the FrameInfo type (RANGE, ROWS, GROUPS). The switch only handles known frame types; an unrecognized FrameInfo.Type reaching getFrameRange throws IllegalArgumentException. This should be unreachable in normal SQL because the parser/analyzer validates frame types.","triggerScenarios":"Internal: a FrameInfo whose getType() is not RANGE/ROWS/GROUPS passed to a window operator — only possible via a buggy planner/analysis path or hand-constructed FrameInfo in custom code.","commonSituations":"Presto internal bugs after adding new frame types without updating WindowPartition; custom extensions constructing window operators directly.","solutions":["Verify the frame specification in the OVER clause uses only ROWS, RANGE, or GROUPS.","If using a custom/modified build, ensure every FrameInfo.Type enum value is handled in WindowPartition.","File a bug with the query plan if reproducible on a stock build."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    result = executeWindowQuery();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported frame type:\")) {\n        // internal/planner bug path — capture query + plan for bug report\n        log.error(\"frame type failure, plan={}\", plan);\n    }\n    throw e;\n}","preventionTips":["Use only ROWS, RANGE, or GROUPS in window frame specs.","Keep coordinator and workers on the same version.","Report reproducible cases as bugs with EXPLAIN output."],"tags":["window-function","internal-error","frame"],"backgroundTag":"unsupported-frame-type","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}