apache/seatunnel · error · UnsupportedOperationException
reconvert not support
Error message
reconvert not support
What it means
DataConverter.reconvert(T typeDefine, Object value) is a default method that converters may override to convert data back from SeaTunnel internal types to external/source types. The default implementation does nothing but throw this UnsupportedOperationException, meaning the concrete converter does not support reverse conversion.
Source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/table/converter/DataConverter.java:103
for (int i = 0; i < fields.length; i++) {
fields[i] = convert(hasTypeDefine ? typeDefine[i] : null, columnDefine[i], fields[i]);
}
return fields;
}
default Object reconvert(T typeDefine, Column columnDefine, Object value) {
return reconvert(typeDefine, value);
}
/**
* Convert object to an external system's data type.
*
* @param typeDefine
* @param value
* @return
*/
default Object reconvert(T typeDefine, Object value) {
throw new UnsupportedOperationException("reconvert not support");
}
default Object reconvert(Column columnDefine, Object value) {
return reconvert(columnDefine.getDataType(), value);
}
/**
* Convert {@link SeaTunnelDataType#getTypeClass()} to an external system's data type.
*
* @param typeDefine
* @param value
* @return
*/
default Object reconvert(SeaTunnelDataType typeDefine, Object value) {
throw new UnsupportedOperationException("reconvert not support");
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Implement/override reconvert(T, Object) in the converter if reverse conversion is required
- Avoid the reconvert code path for this converter and convert externally
- Switch to a converter implementation that supports reconvert
Example fix
// before
// default: throws
default Object reconvert(T typeDefine, Object value) { throw new UnsupportedOperationException("reconvert not support"); }
// after
@Override
public Object reconvert(MyTypeDefine typeDefine, Object value) {
return externalFormat((SeaTunnelRow) value, typeDefine);
} Defensive patterns
Strategy: try-catch
Validate before calling
// probe once at startup whether reconvert is supported
try {
converter.reconvert(typeDefine, sampleValue);
reconvertSupported = true;
} catch (UnsupportedOperationException e) {
reconvertSupported = false;
} Try / catch
try {
Object nativeValue = converter.reconvert(typeDefine, value);
} catch (UnsupportedOperationException e) {
// fall back to external reverse conversion or skip
nativeValue = fallbackReconvert(value);
} Prevention
- Check whether the converter class overrides reconvert before relying on it
- Document forward-only converters in your pipeline design
- Implement reconvert in custom converters used for write-back
When it happens
Trigger: Calling reconvert(typeDefine, value) (including via the Column overload which delegates here) on a converter that has not overridden the method.
Common situations: Using a write-back or echo feature that assumes bidirectional conversion with a converter that only implements forward conversion.
Related errors
- Unsupported convert ${value.getClass()} to Float, typeDefine
- Unsupported convert ${value.getClass()} to Float
- Unsupported convert ${value.getClass()} to Long, typeDefine:
- Unsupported convert ${value.getClass()} to Long
- Unsupported convert ${value.getClass()} to Integer, typeDefi
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3742f40b4a8e3d2a.
Report an issue: GitHub.