{"record":{"id":"99171add1981d16d","repo":"prestodb/presto","slug":"not-supported-99171a","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/index/TuplePageFilter.java","lineNumber":97,"sourceCode":"            selectedPositions[position] = matches(page, position);\n        }\n\n        return PageFilter.positionsArrayToSelectedPositions(selectedPositions, page.getPositionCount());\n    }\n\n    private boolean matches(Page page, int position)\n    {\n        for (int channel = 0; channel < inputChannels.size(); channel++) {\n            Type type = types.get(channel);\n            Block outputBlock = page.getBlock(channel);\n            Block singleTupleBlock = tuplePage.getBlock(channel);\n            try {\n                if (!type.equalTo(singleTupleBlock, 0, outputBlock, position)) {\n                    return false;\n                }\n            }\n            catch (NotSupportedException e) {\n                throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);\n            }\n        }\n        return true;\n    }\n}\n","sourceCodeStart":79,"sourceCodeEnd":103,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/index/TuplePageFilter.java#L79-L103","documentation":"TuplePageFilter.matches compares each column value of a candidate index tuple against the single cached tuple using the type's equalTo. Some types do not implement equality comparison (NotSupportedException), so the filter cannot evaluate the predicate and wraps the failure in a PrestoException with the type's message as text. The message is literally the underlying type's unsupported-operation message, e.g. for types lacking comparison support.","triggerScenarios":"Running an index-join / index lookup where the equality predicate involves a column type whose Type.equalTo throws NotSupportedException (e.g. types without a defined comparison, such as unknown/complex types).","commonSituations":"Index joins over columns of exotic or nested types (map/row-like or custom parametric types) where the engine assumed equality was supported; often surfaces after adding a new type plugin or casting to an unusual type in the join key.","solutions":["Change the join/predicate key to a type with defined equality (e.g. CAST the column to VARCHAR or BIGINT) in the index lookup condition.","Check the NotSupportedException message to identify which type lacks equalTo and avoid it in indexed predicates.","If this is a connector/type-plugin you own, implement equalTo (and hash) for the type.","Restructure the query to filter unsupported-type rows before the index join."],"exampleFix":"// before\nSELECT * FROM t JOIN index_source i ON t.weird_col = i.key\n// after\nSELECT * FROM t JOIN index_source i ON CAST(t.weird_col AS VARCHAR) = CAST(i.key AS VARCHAR)","handlingStrategy":"try-catch","validationCode":"// Cannot inspect type equality support from SQL; avoid unsupported types in join keys\n-- ensure predicate columns are scalar: SELECT typeof(col) ...","typeGuard":null,"tryCatchPattern":"try {\n  runIndexJoinQuery();\n} catch (PrestoException e) {\n  if (e.getErrorCode().getName().equals(\"NOT_SUPPORTED\")) {\n    // fall back to CAST-to-VARCHAR join or hash join path\n  } else throw e;\n}","preventionTips":["Use only scalar types (BIGINT, VARCHAR, DOUBLE) as index join keys","CAST exotic types before predicates","Check typeof() of join columns during query design"],"tags":["index-join","type-system","not-supported"],"backgroundTag":"unsupported-comparison-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"}