prestodb/presto · error · IllegalArgumentException

Subfield column [

Error message

Subfield column [

What it means

Internal error prefix used in visitProject when rewriting the plan with extracted subfield columns: a variable or assignment related to the dereference-to-nested-column mapping could not be resolved during the rewrite. A planner-internal failure of the dereference pushdown rule, not user data.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/rule/ParquetDereferencePushDown.java:349

                    rowExpressionService.getExpressionOptimizer(session),
                    new HashSet<>(project.getAssignments().getExpressions()));
            if (dereferenceToNestedColumnMap.isEmpty()) {
                return visitPlan(project, context);
            }

            List<VariableReferenceExpression> newOutputVariables = new ArrayList<>(tableScan.getOutputVariables());
            Map<VariableReferenceExpression, ColumnHandle> newAssignments = new HashMap<>(tableScan.getAssignments());

            Map<RowExpression, VariableReferenceExpression> dereferenceToVariableMap = new HashMap<>();

            for (Map.Entry<RowExpression, Subfield> dereference : dereferenceToNestedColumnMap.entrySet()) {
                Subfield subfield = dereference.getValue();
                RowExpression dereferenceExpression = dereference.getKey();

                // Find the nested column Hive Type
                ColumnHandle baseColumnHandle = baseColumnHandles.get(subfield.getRootName());
                if (baseColumnHandle == null) {
                    throw new IllegalArgumentException("Subfield column [" + subfield + "]'s base column " + subfield.getRootName() + " is not present in table scan output");
                }
                String subfieldColumnName = pushdownColumnNameForSubfield(subfield);

                ColumnHandle nestedColumnHandle = createSubfieldColumnHandle(
                        baseColumnHandle,
                        subfield,
                        dereferenceExpression.getType(),
                        subfieldColumnName);

                VariableReferenceExpression newOutputVariable = variableAllocator.newVariable(subfieldColumnName, dereferenceExpression.getType());
                newOutputVariables.add(newOutputVariable);
                newAssignments.put(newOutputVariable, nestedColumnHandle);

                dereferenceToVariableMap.put(dereferenceExpression, newOutputVariable);
            }

            TableScanNode newTableScan = new TableScanNode(
                    tableScan.getSourceLocation(),

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Report a planner bug with the query and plan
  2. Disable ParquetDereferencePushDown as a workaround
  3. Upgrade Presto to a release fixing the rule
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/rule/ParquetDereferencePushDown.java:349 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/8052599cf24ebd0c. Report an issue: GitHub.