{"record":{"id":"4457a5312adb68be","repo":"prestodb/presto","slug":"invalid-function-argument-4457a5","errorCode":"INVALID_FUNCTION_ARGUMENT","errorMessage":"Input type %s not supported","messagePattern":"Input type (.+?) not supported","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/operator/scalar/ArrayJoin.java","lineNumber":269,"sourceCode":"                MethodHandle targetStack = MethodHandles.insertArguments(methodHandleStack, 0, cast);\n                MethodHandle targetProvidedBlock = MethodHandles.insertArguments(methodHandleProvidedBlock, 0, cast);\n                return new BuiltInScalarFunctionImplementation(\n                        ImmutableList.of(\n                                new ScalarFunctionImplementationChoice(\n                                        false,\n                                        argumentProperties,\n                                        STACK,\n                                        targetStack,\n                                        Optional.empty()),\n                                new ScalarFunctionImplementationChoice(\n                                        false,\n                                        argumentProperties,\n                                        PROVIDED_BLOCKBUILDER,\n                                        targetProvidedBlock,\n                                        Optional.empty())));\n            }\n            catch (PrestoException e) {\n                throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format(\"Input type %s not supported\", type), e);\n            }\n        }\n    }\n\n    @UsedByGeneratedCode\n    public static Slice arrayJoinStack(\n            MethodHandle castFunction,\n            SqlFunctionProperties properties,\n            Block arrayBlock,\n            Slice delimiter)\n    {\n        return arrayJoinStack(castFunction, properties, arrayBlock, delimiter, null);\n    }\n\n    @UsedByGeneratedCode\n    public static void arrayJoinProvidedBlock(\n            MethodHandle castFunction,\n            SqlFunctionProperties properties,","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/scalar/ArrayJoin.java#L251-L287","documentation":"Specialization-time type guard in ArrayJoin.specializeArrayJoin: the element type of the array argument has no VARCHAR cast implementation available, so the generated array_join code cannot be compiled for this input type.","triggerScenarios":"Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/scalar/ArrayJoin.java:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Cast the array to array(varchar) before calling array_join","Use an element type with a built-in VARCHAR cast","Format non-castable types to strings first via transform"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}