apache/seatunnel · error · UnsupportedOperationException
setTypeInfo method is not supported
Error message
setTypeInfo method is not supported
What it means
SeaTunnelTransform.setTypeInfo is the deprecated pre-Factory-API way to declare a transform's input type. The default implementation throws UnsupportedOperationException to signal that the transform does not support the legacy type-setting path, forcing migration to the Factory-based SPI.
Source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelTransform.java:43
import java.io.Serializable;
import java.util.List;
public interface SeaTunnelTransform<T>
extends Serializable, PluginIdentifierInterface, SeaTunnelJobAware {
/** call it when Transformer initialed */
default void open() {}
/**
* Set the data type info of input data.
*
* @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory}
* @param inputDataType The data type info of upstream input.
*/
@Deprecated
default void setTypeInfo(SeaTunnelDataType<T> inputDataType) {
throw new UnsupportedOperationException("setTypeInfo method is not supported");
}
/** Get the catalog table output by this transform */
CatalogTable getProducedCatalogTable();
List<CatalogTable> getProducedCatalogTables();
default SchemaChangeEvent mapSchemaChangeEvent(SchemaChangeEvent schemaChangeEvent) {
return schemaChangeEvent;
}
/**
* Called by the engine when an upstream transform's produced schema changes (e.g., after a
* schema-change event flows through the chain). Allows this transform to re-derive its state
* from the new upstream layout instead of applying schema changes to a stale local view.
*
* <p>Without this, downstream transforms in a chain accumulate divergence: each one applies the
* ALTER event locally (appending new cols at end of its own catalog), but the actual data rowView on GitHub (pinned to cf67b549a7)
Solutions
- Migrate the calling code to the Factory API: implement a TransformFactory and rely on applyTransform(...) instead of setTypeInfo
- If implementing a transform that still needs this path, override setTypeInfo to accept the input SeaTunnelDataType
- Update the job/config to a path that resolves the transform via its factory
Example fix
// before transform.setTypeInfo(catalogTable.getSeaTunnelRowType()); // after DataChangeEvent via factory: TableTransformFactory factory = (TableTransformFactory) discovery.get(TableTransformFactory.class.getSimpleName()); Transform transform = factory.applyTransform(context);
Defensive patterns
Strategy: try-catch
Validate before calling
// prefer the Factory API; only call setTypeInfo if the transform is legacy
if (transform.getClass().isAnnotationPresent(Deprecated.class)) { transform.setTypeInfo(inputType); } Try / catch
try { transform.setTypeInfo(inputType); } catch (UnsupportedOperationException e) { // transform uses Factory API; obtain type via transform.getProducedCatalogTable() } Prevention
- Migrate to the TransformFactory SPI instead of the deprecated setTypeInfo path
- Check @Deprecated annotations before calling legacy API methods
- Prefer constructing transforms via Factory discovery
When it happens
Trigger: Calling setTypeInfo(...) on a transform implementation that does not override the default method (any modern transform using the Factory API) — typically from legacy translation/adapter code or old connector code written against the pre-2.3 API.
Common situations: Running old Flink/Spark translation code against a modern transform; a custom transform invoked through a legacy code path; following outdated examples that predate the CatalogTable/Factory refactor.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- The Factory has not been implemented and the deprecated Plug
- A decoding format must override this method to apply metadat
- Unsupported convert %s to %s
- Unsupported convert ${value.getClass()} to Float, typeDefine
- Unsupported convert ${value.getClass()} to Float
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ffaee26ab6e62fd1.
Report an issue: GitHub.