prestodb/presto · warning · SQLException

Unhandled nullable type:

Error message

Unhandled nullable type: 

What it means

isNullable() exhaustively switches over the known Nullability values (NO_NULLS/NULLABLE/UNKNOWN mapped to columnNoNulls/columnNullable/columnNullableUnknown) and throws this SQLException for any unhandled enum value. In practice it fires only when the driver and a newer server introduce a Nullability constant this JDBC version does not know.

Source

Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSetMetaData.java:90

            throws SQLException
    {
        return column(column).isCurrency();
    }

    @Override
    public int isNullable(int column)
            throws SQLException
    {
        ColumnInfo.Nullable nullable = column(column).getNullable();
        switch (nullable) {
            case NO_NULLS:
                return columnNoNulls;
            case NULLABLE:
                return columnNullable;
            case UNKNOWN:
                return columnNullableUnknown;
        }
        throw new SQLException("Unhandled nullable type: " + nullable);
    }

    @Override
    public boolean isSigned(int column)
            throws SQLException
    {
        return column(column).isSigned();
    }

    @Override
    public int getColumnDisplaySize(int column)
            throws SQLException
    {
        return column(column).getColumnDisplaySize();
    }

    @Override
    public String getColumnLabel(int column)

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade the Presto JDBC driver to match the server version
  2. As a workaround, treat the SQLException as 'nullability unknown' (columnNullableUnknown = 2) in calling code
  3. Check driver and coordinator versions match in deployment config

Example fix

// before
int n = meta.isNullable(1); // throws on unknown enum
// after
int n;
try { n = meta.isNullable(1); } catch (SQLException e) { n = java.sql.ResultSetMetaData.columnNullableUnknown; }
Defensive patterns

Strategy: try-catch

Validate before calling

// pin driver version to coordinator version
String driverVersion = prestoDriver.getMajorVersion();
if (!driverVersion.equals(expectedServerMajor)) {
    log.warn("Presto driver {} vs server {} version skew; metadata enums may be unhandled", driverVersion, expectedServerMajor);
}

Try / catch

int nullable;
try {
    nullable = meta.isNullable(col);
} catch (SQLException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Unhandled nullable type")) {
        nullable = java.sql.ResultSetMetaData.columnNullableUnknown; // safe default
    } else { throw e; }
}

Prevention

When it happens

Trigger: Calling ResultSetMetaData.isNullable(column) when the column's Nullability enum from the server is a value the loaded driver version doesn't handle (version skew between client and coordinator).

Common situations: Mismatched driver/coordinator versions after a Presto server upgrade; custom or patched builds adding new enum constants; rarely, corrupted column metadata.

Related errors


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