prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Could not create page source for table type ${tableType}

What it means

HudiPageSourceProvider builds either a Parquet-based page source or a RecordPageSource from a record cursor; if the split's table/input format matches neither branch, it throws NOT_SUPPORTED. This means the connector cannot produce a reader for that table type / storage format.

Source

Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiPageSourceProvider.java:135

                    layout.getTable().getSchemaName(),
                    layout.getTable().getTableName(),
                    layout.getPartitionColumns().stream().map(HudiColumnHandle::getName).collect(toImmutableList()),
                    layout.getPartitionColumns().stream().map(HudiColumnHandle::getHiveType).collect(toImmutableList()));
            RecordCursor recordCursor = HudiRecordCursors.createRealtimeRecordCursor(
                    hdfsEnvironment,
                    session,
                    schema,
                    hudiSplit,
                    dataColumns,
                    ZoneId.of("UTC"), // TODO configurable
                    typeManager);
            List<Type> types = dataColumns.stream()
                    .map(column -> column.getHiveType().getType(typeManager))
                    .collect(toImmutableList());
            dataColumnPageSource = new RecordPageSource(types, recordCursor);
        }
        else {
            throw new PrestoException(NOT_SUPPORTED, "Could not create page source for table type " + tableType);
        }

        return new HudiPageSource(
                hudiColumnHandles,
                hudiSplit.getPartition().getKeyValues(),
                dataColumnPageSource,
                session.getSqlFunctionProperties().getTimeZoneKey(),
                typeManager);
    }

    private static List<Column> toMetastoreColumns(List<HudiColumnHandle> hudiColumnHandles)
    {
        return hudiColumnHandles.stream()
                .map(column -> new Column(column.getName(), column.getHiveType(), Optional.empty(), Optional.empty()))
                .collect(toImmutableList());
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check the table's Hudi table type and base file format; convert the table to a supported format (e.g. Parquet-based COPY_ON_WRITE)
  2. Rewrite data with a supported input format via Hudi compaction/clustering or a CTAS into a supported table
  3. Upgrade Presto/Hudi connector to a version supporting the table type in the message
  4. Fix table properties (inputformat) in the metastore if they were set incorrectly

Example fix

-- before: MOR table with unsupported log-only layout
-- after: compact to supported base files / use COPY_ON_WRITE
spark.sql("CALL hudi.compact(run => 'compaction-0001')") -- or recreate as COPY_ON_WRITE Parquet
Defensive patterns

Strategy: fallback

Validate before calling

// Check table layout before querying
String inputFormat = tableProperty("inputformat");
Set<String> SUPPORTED = Set.of("org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat" /*, other supported formats */);
if (!SUPPORTED.contains(inputFormat)) {
    throw new IllegalStateException("Unsupported input format: " + inputFormat);
}

Try / catch

try {
    return query(hudiTable);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.getCode()
            && e.getMessage().contains("Could not create page source for table type")) {
        // fallback: run via an engine/format that supports it, or after conversion
    }
    throw e;
}

Prevention

When it happens

Trigger: createPageSource encounters a Hudi split whose data type is neither the supported columnar (Parquet/ORC) path nor a recognized record-cursor input format — e.g. an unexpected Hudi table type or base file format.

Common situations: Hudi tables written with formats the connector build doesn't support (e.g. newer base file formats), tables with input formats outside the supported set, or misconfigured table properties pointing at an exotic input format.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


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