{"record":{"id":"52673a8282f61a62","repo":"apache/flink","slug":"grouping-is-only-possible-on-composite-types","errorCode":null,"errorMessage":"Grouping is only possible on composite types.","messagePattern":"Grouping is only possible on composite types\\.","errorType":"validation","errorClass":"InvalidProgramException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/api/common/operators/base/ReduceOperatorBase.java","lineNumber":219,"sourceCode":"\n    @Override\n    protected List<T> executeOnCollections(\n            List<T> inputData, RuntimeContext ctx, ExecutionConfig executionConfig)\n            throws Exception {\n        // make sure we can handle empty inputs\n        if (inputData.isEmpty()) {\n            return Collections.emptyList();\n        }\n\n        ReduceFunction<T> function = this.userFunction.getUserCodeObject();\n\n        UnaryOperatorInformation<T, T> operatorInfo = getOperatorInfo();\n        TypeInformation<T> inputType = operatorInfo.getInputType();\n\n        int[] inputColumns = getKeyColumns(0);\n\n        if (!(inputType instanceof CompositeType) && inputColumns.length > 1) {\n            throw new InvalidProgramException(\"Grouping is only possible on composite types.\");\n        }\n\n        FunctionUtils.setFunctionRuntimeContext(function, ctx);\n        FunctionUtils.openFunction(function, DefaultOpenContext.INSTANCE);\n\n        TypeSerializer<T> serializer =\n                getOperatorInfo()\n                        .getInputType()\n                        .createSerializer(executionConfig.getSerializerConfig());\n\n        if (inputColumns.length > 0) {\n            boolean[] inputOrderings = new boolean[inputColumns.length];\n            TypeComparator<T> inputComparator =\n                    inputType instanceof AtomicType\n                            ? ((AtomicType<T>) inputType).createComparator(false, executionConfig)\n                            : ((CompositeType<T>) inputType)\n                                    .createComparator(\n                                            inputColumns, inputOrderings, 0, executionConfig);","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/api/common/operators/base/ReduceOperatorBase.java#L201-L237","documentation":"Error \"Grouping is only possible on composite types.\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Grouping is only possible on composite types.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Grouping is only possible on composite types.","solutions":["Address the cause reported by the error message: Grouping is only possible on composite types.","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Grouping is only possible on composite types.\") 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"}