prestodb/presto · error · GenericInternalException

Unsupported Hive type: %s

Error message

Unsupported Hive type: %s

What it means

OrcWriteValidation statistics-extraction guard: a Hive/ORC column type has no mapping to a statistics builder or field extractor (the switch on the type fell through to default). The %s names the unsupported Hive type; means the writer cannot compute validation stats for that column type.

Source

Thrown at presto-orc/src/main/java/com/facebook/presto/orc/OrcWriteValidation.java:913

                        .map(ColumnStatisticsValidation::new)
                        .collect(toImmutableList());
            }
            else if (type.getTypeSignature().getBase().equals(ROW)) {
                statisticsBuilder = new CountStatisticsBuilder();
                fieldExtractor = block -> {
                    ColumnarRow columnarRow = ColumnarRow.toColumnarRow(block);
                    ImmutableList.Builder<Block> fields = ImmutableList.builder();
                    for (int index = 0; index < columnarRow.getFieldCount(); index++) {
                        fields.add(columnarRow.getField(index));
                    }
                    return fields.build();
                };
                fieldBuilders = type.getTypeParameters().stream()
                        .map(ColumnStatisticsValidation::new)
                        .collect(toImmutableList());
            }
            else {
                throw new GenericInternalException(format("Unsupported Hive type: %s", type));
            }
        }

        private void addBlock(Block block)
        {
            statisticsBuilder.addBlock(type, block);

            List<Block> fields = fieldExtractor.apply(block);
            for (int i = 0; i < fieldBuilders.size(); i++) {
                fieldBuilders.get(i).addBlock(fields.get(i));
            }
        }

        private void build(ImmutableList.Builder<ColumnStatistics> output)
        {
            output.add(statisticsBuilder.buildColumnStatistics());
            fieldBuilders.forEach(fieldBuilders -> fieldBuilders.build(output));
        }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Cast the column to a supported type before writing with validation
  2. Disable write validation for the job if the type is intentionally exotic
  3. Add support for the type in OrcWriteValidation as an engine fix
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/OrcWriteValidation.java:913 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/c652afe4f5ea5e45. Report an issue: GitHub.