prestodb/presto · error · IllegalStateException

stream type not implemented yet

Error message

 stream type not implemented yet

What it means

ORC type-mapping guard in OrcMetadataReader.toTypeKind: the ORC file's type tree contains a kind with no mapping to an OrcTypeKind (the switch fell through to default). The file uses a column type this Presto build does not understand — either a newer ORC type or a corrupt type entry.

Source

Thrown at presto-orc/src/main/java/com/facebook/presto/orc/metadata/OrcMetadataReader.java:547

                return OrcTypeKind.TIMESTAMP;
            case LIST:
                return OrcTypeKind.LIST;
            case MAP:
                return OrcTypeKind.MAP;
            case STRUCT:
                return OrcTypeKind.STRUCT;
            case UNION:
                return OrcTypeKind.UNION;
            case DECIMAL:
                return OrcTypeKind.DECIMAL;
            case DATE:
                return OrcTypeKind.DATE;
            case VARCHAR:
                return OrcTypeKind.VARCHAR;
            case CHAR:
                return OrcTypeKind.CHAR;
            default:
                throw new IllegalStateException(typeKind + " stream type not implemented yet");
        }
    }

    // This method assumes type attributes have no duplicate key
    private static Map<String, String> toMap(List<OrcProto.StringPair> attributes)
    {
        ImmutableMap.Builder<String, String> results = new ImmutableMap.Builder<>();
        if (attributes != null) {
            for (OrcProto.StringPair attribute : attributes) {
                if (attribute.hasKey() && attribute.hasValue()) {
                    results.put(attribute.getKey(), attribute.getValue());
                }
            }
        }
        return results.build();
    }

    private static StreamKind toStreamKind(OrcProto.Stream.Kind streamKind)

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto to a version supporting the ORC type in question
  2. Verify the file was written by a compatible ORC writer
  3. Exclude the unsupported column/table from queries
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/metadata/OrcMetadataReader.java:547 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/bff012bcf8dd10ff. Report an issue: GitHub.