{"record":{"id":"9b48071c5ecb6b88","repo":"prestodb/presto","slug":"unsupported-type-for-s","errorCode":null,"errorMessage":"Unsupported type for %s","messagePattern":"Unsupported type for (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-common/src/main/java/com/facebook/presto/common/array/ReferenceCountMap.java","lineNumber":97,"sourceCode":"        // The collision rate can be lower than 0.001% if there are 1000 different sizes.\n        int extraIdentity;\n        if (key == null) {\n            extraIdentity = 0;\n        }\n        else if (key instanceof Block) {\n            extraIdentity = (int) ((Block) key).getRetainedSizeInBytes();\n        }\n        else if (key instanceof Slice) {\n            extraIdentity = (int) ((Slice) key).getRetainedSize();\n        }\n        else if (key.getClass().isArray()) {\n            extraIdentity = getLength(key);\n        }\n        else if (key instanceof AbstractMapBlock.HashTables) {\n            extraIdentity = (int) ((AbstractMapBlock.HashTables) key).getRetainedSizeInBytes();\n        }\n        else {\n            throw new IllegalArgumentException(format(\"Unsupported type for %s\", key));\n        }\n        return (((long) System.identityHashCode(key)) << Integer.SIZE) + extraIdentity;\n    }\n}\n","sourceCodeStart":79,"sourceCodeEnd":102,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-common/src/main/java/com/facebook/presto/common/array/ReferenceCountMap.java#L79-L102","documentation":"getHashCode computes an identity hash for reference-counted cache keys from Block, Slice, array, or HashTables types; this throw is the terminal branch for any other key class passed to ReferenceCountMap, i.e. an unsupported key type.","triggerScenarios":"Thrown at presto-common/src/main/java/com/facebook/presto/common/array/ReferenceCountMap.java:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure only supported key kinds (Block, Slice, arrays) are placed in the reference-count map","Add a branch for the new key type if a new abstraction is introduced"],"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"}