{"record":{"id":"628143c8d6e75cc4","repo":"prestodb/presto","slug":"pinot-unsupported-expression","errorCode":"PINOT_UNSUPPORTED_EXPRESSION","errorMessage":"%s","messagePattern":"%s","errorType":"error_code","errorClass":"PinotException","httpStatus":null,"severity":"warning","filePath":"presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotPushdownUtils.java","lineNumber":126,"sourceCode":"            this.callExpression = callExpression;\n        }\n\n        public CallExpression getCallExpression()\n        {\n            return callExpression;\n        }\n\n        @Override\n        public String toString()\n        {\n            return callExpression.toString();\n        }\n    }\n\n    public static void checkSupported(boolean condition, String errorMessage, Object... errorMessageArgs)\n    {\n        if (!condition) {\n            throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), String.format(errorMessage, errorMessageArgs));\n        }\n    }\n\n    public abstract static class AggregationColumnNode\n    {\n        private final ExpressionType expressionType;\n        private final VariableReferenceExpression outputColumn;\n\n        public AggregationColumnNode(ExpressionType expressionType, VariableReferenceExpression outputColumn)\n        {\n            this.expressionType = expressionType;\n            this.outputColumn = outputColumn;\n        }\n\n        public VariableReferenceExpression getOutputColumn()\n        {\n            return outputColumn;\n        }","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotPushdownUtils.java#L108-L144","documentation":"checkSupported is the Pinot connector's generic guard: when a condition guaranteeing translatable SQL is not met, it throws PinotException with code PINOT_UNSUPPORTED_EXPRESSION carrying the caller-supplied message. The connector only pushes down constructs it can express in Pinot query syntax, so anything else is rejected at planning time.","triggerScenarios":"Any call to PinotPushdownUtils.checkSupported(false, ...) during pushdown planning, e.g. an expression, function, or clause the connector cannot translate into Pinot PQL/SQL.","commonSituations":"Querying with functions Pinot lacks (e.g. regexp predicates, exotic types), filters on unsupported expressions like non-literal right sides, or IS NULL on array/map types.","solutions":["Rewrite the query to avoid the unsupported construct (e.g. simplify the WHERE clause or use a supported function)","Use the exact message in the exception to identify which expression failed and replace it with a Pinot-compatible equivalent","If the expression must be supported, filter rows outside the connector (e.g. wrap the query or fetch raw data and post-process)","Check connector docs/release notes; newer Presto/Pinot versions may support the construct, so upgrade"],"exampleFix":"// before\nSELECT * FROM t WHERE regexp_like(col, 'a.*')\n// after\nSELECT * FROM t WHERE col LIKE 'a%'","handlingStrategy":"try-catch","validationCode":"// pre-check that pushed predicates only use supported functions\n// keep WHERE clauses to comparisons with literal right-hand sides\n// avoid regexp/UDF-style functions in pushdown-eligible queries","typeGuard":null,"tryCatchPattern":"try {\n    query.execute();\n} catch (PinotException e) {\n    if (e.getErrorCode() == PINOT_UNSUPPORTED_EXPRESSION.toErrorCode().getCode()) {\n        // fall back to a non-pushdown plan or rewrite the query\n    } else {\n        throw e;\n    }\n}","preventionTips":["Read the message to see the exact rejected expression","Restrict pushed-down predicates to simple column-literal comparisons","Test new query patterns against Pinot before production use"],"tags":["pinot","pushdown","unsupported-expression","query-planning"],"backgroundTag":"pinot-unsupported-expression","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"}