prestodb/presto · error · ArrowException

ARROW_FLIGHT_TYPE_ERROR

ARROW_FLIGHT_TYPE_ERROR

Error message

Unexpected floating point precision: {floatingPoint.getPrecision()}

What it means

Raised while mapping an Arrow floating-point field to a Presto type: the field's precision does not correspond to any known width (HALF/SINGLE/DOUBLE). It is a sentinel guard for an unrecognized precision value; the message uses a literal '{floatingPoint.getPrecision()}' because it was not formatted.

Source

Thrown at presto-common-arrow/src/main/java/com/facebook/plugin/arrow/ArrowBlockBuilder.java:176

            }
            case Struct: {
                List<RowType.Field> children = field.getChildren().stream().map(child -> new RowType.Field(Optional.of(child.getName()), getPrestoTypeFromArrowField(child))).collect(toImmutableList());
                return RowType.from(children);
            }
            default:
                throw new UnsupportedOperationException("The data type " + field.getType().getTypeID() + " is not supported.");
        }
    }

    private Type getPrestoTypeForArrowFloatingPointType(ArrowType.FloatingPoint floatingPoint)
    {
        switch (floatingPoint.getPrecision()) {
            case SINGLE:
                return RealType.REAL;
            case DOUBLE:
                return DoubleType.DOUBLE;
            default:
                throw new ArrowException(ARROW_FLIGHT_TYPE_ERROR, "Unexpected floating point precision: " + floatingPoint.getPrecision());
        }
    }

    private Type getPrestoTypeForArrowIntType(ArrowType.Int intType)
    {
        switch (intType.getBitWidth()) {
            case 64:
                return BigintType.BIGINT;
            case 32:
                return IntegerType.INTEGER;
            case 16:
                return SmallintType.SMALLINT;
            case 8:
                return TinyintType.TINYINT;
            default:
                throw new ArrowException(ARROW_FLIGHT_TYPE_ERROR, "Unexpected bit width: " + intType.getBitWidth());
        }
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Use SINGLE or DOUBLE precision Arrow floating fields
  2. Cast the column upstream to a supported precision
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-common-arrow/src/main/java/com/facebook/plugin/arrow/ArrowBlockBuilder.java:176 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/f11a401c0a9cf272. Report an issue: GitHub.