{"record":{"id":"2ed73e5b7f64b9ee","repo":"prestodb/presto","slug":"not-supported-2ed73e","errorCode":"NOT_SUPPORTED","errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/operator/scalar/MapElementAtFunction.java","lineNumber":137,"sourceCode":"\n        return new BuiltInScalarFunctionImplementation(\n                true,\n                ImmutableList.of(\n                        valueTypeArgumentProperty(RETURN_NULL_ON_NULL),\n                        valueTypeArgumentProperty(RETURN_NULL_ON_NULL)),\n                methodHandle);\n    }\n\n    @UsedByGeneratedCode\n    public static Object elementAt(MethodHandle keyNativeHashCode, MethodHandle keyBlockNativeEquals, MethodHandle keyBlockHashCode, Type valueType, Block map, boolean key)\n    {\n        SingleMapBlock mapBlock = (SingleMapBlock) map;\n        int valuePosition;\n        try {\n            valuePosition = mapBlock.seekKeyExact(key, keyNativeHashCode, keyBlockNativeEquals, keyBlockHashCode);\n        }\n        catch (NotSupportedException e) {\n            throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);\n        }\n\n        if (valuePosition == -1) {\n            return null;\n        }\n        return readNativeValue(valueType, mapBlock, valuePosition);\n    }\n\n    @UsedByGeneratedCode\n    public static Object elementAt(MethodHandle keyNativeHashCode, MethodHandle keyBlockNativeEquals, MethodHandle keyBlockHashCode, Type valueType, Block map, long key)\n    {\n        SingleMapBlock mapBlock = (SingleMapBlock) map;\n        int valuePosition;\n        try {\n            valuePosition = mapBlock.seekKeyExact(key, keyNativeHashCode, keyBlockNativeEquals, keyBlockHashCode);\n        }\n        catch (NotSupportedException e) {\n            throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/scalar/MapElementAtFunction.java#L119-L155","documentation":"Error from element_at when looking up a key in a single-map block: the underlying seek/hash probe threw (typically a DuplicateMapKeyException from an inconsistent map block, or an invocation of the key equality/hash operator that failed), and the original exception's message is carried through on the INVALID_FUNCTION_ARGUMENT error.","triggerScenarios":"Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/scalar/MapElementAtFunction.java:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the map argument was built without duplicate keys","Verify the map's key type supports equality (e.g. not a key type with unimplemented operators)","Use try(element_at(m, k)) to tolerate occasional failures while investigating"],"exampleFix":null,"handlingStrategy":"try-catch","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"}