apache/flink · error · RuntimeException

Can not convert to type for partition value

Error message

Can not convert %s to type %s for partition value

What it means

Thrown by restorePartValueFromType when a partition value string cannot be parsed/converted into the declared logical type of the partition column (e.g. non-numeric string for INTEGER, bad date format).

Solutions

  1. Address the cause reported by the error message: Can not convert the reported value to type the reported value for partition value
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Can not convert the reported value to type the reported value for partition value") and rerun the job or command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered at runtime when the operation fails because: Can not convert the reported value to type the reported value for partition value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Can not convert the reported value to type the reported value for partition value.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/1a5a84e18a88a0d6. Report an issue: GitHub.

Appendix: source

Thrown at flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/RowPartitionComputer.java:126

                return Integer.valueOf(valStr).byteValue();
            case SMALLINT:
                return Short.valueOf(valStr);
            case INTEGER:
                return Integer.valueOf(valStr);
            case BIGINT:
                return Long.valueOf(valStr);
            case FLOAT:
                return Float.valueOf(valStr);
            case DOUBLE:
                return Double.valueOf(valStr);
            case DATE:
                return LocalDate.parse(valStr);
            case TIMESTAMP_WITHOUT_TIME_ZONE:
                return LocalDateTime.parse(valStr);
            case DECIMAL:
                return new BigDecimal(valStr);
            default:
                throw new RuntimeException(
                        String.format(
                                "Can not convert %s to type %s for partition value", valStr, type));
        }
    }
}

View on GitHub (pinned to 2f3c205e92)