prestodb/presto · error · PrestoException

CLICKHOUSE_PUSHDOWN_UNSUPPORTED_EXPRESSION

CLICKHOUSE_PUSHDOWN_UNSUPPORTED_EXPRESSION

Error message

Unsupported pushdown for ClickHouse connector with plan node of type 

What it means

The plan visitor reached a PlanNode kind it cannot translate into ClickHouse SQL (only the specific pushdown node types are handled); visitPlan is the default unsupported-case branch of the query generator.

Source

Thrown at presto-clickhouse/src/main/java/com/facebook/presto/plugin/clickhouse/optimization/ClickHouseQueryGenerator.java:189

                    .add("pushdown", pushdown)
                    .toString();
        }
    }

    private class ClickHouseQueryPlanVisitor
            extends PlanVisitor<ClickHouseQueryGeneratorContext, ClickHouseQueryGeneratorContext>
    {
        private final ConnectorSession session;

        protected ClickHouseQueryPlanVisitor(ConnectorSession session)
        {
            this.session = session;
        }

        @Override
        public ClickHouseQueryGeneratorContext visitPlan(PlanNode node, ClickHouseQueryGeneratorContext context)
        {
            throw new PrestoException(CLICKHOUSE_PUSHDOWN_UNSUPPORTED_EXPRESSION, "Unsupported pushdown for ClickHouse connector with plan node of type " + node);
        }

        protected VariableReferenceExpression getVariableReference(RowExpression expression)
        {
            if (expression instanceof VariableReferenceExpression) {
                return ((VariableReferenceExpression) expression);
            }
            throw new PrestoException(CLICKHOUSE_PUSHDOWN_UNSUPPORTED_EXPRESSION, "Unsupported pushdown for ClickHouse connector. Expect variable reference, but get: " + expression);
        }

        @Override
        public ClickHouseQueryGeneratorContext visitMarkDistinct(MarkDistinctNode node, ClickHouseQueryGeneratorContext context)
        {
            requireNonNull(context, "context is null");
            return node.getSource().accept(this, context);
        }

        @Override

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Disable the pushdown that produced the unsupported plan node via session properties
  2. Upgrade the connector so the node type is translated
  3. Report the plan node type to maintainers as a pushdown gap
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-clickhouse/src/main/java/com/facebook/presto/plugin/clickhouse/optimization/ClickHouseQueryGenerator.java:189 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/6b4b0786222f9e52. Report an issue: GitHub.