{"record":{"id":"2052a44db0af087e","repo":"apache/flink","slug":"unsupported-type-2052a4","errorCode":null,"errorMessage":"Unsupported type: {}","messagePattern":"Unsupported type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/row/ParquetRowDataWriter.java","lineNumber":146,"sourceCode":"                    return new ShortWriter();\n                case DATE:\n                case TIME_WITHOUT_TIME_ZONE:\n                case INTEGER:\n                    return new IntWriter();\n                case BIGINT:\n                    return new LongWriter();\n                case FLOAT:\n                    return new FloatWriter();\n                case DOUBLE:\n                    return new DoubleWriter();\n                case TIMESTAMP_WITHOUT_TIME_ZONE:\n                    TimestampType timestampType = (TimestampType) t;\n                    return new TimestampWriter(timestampType.getPrecision());\n                case TIMESTAMP_WITH_LOCAL_TIME_ZONE:\n                    LocalZonedTimestampType localZonedTimestampType = (LocalZonedTimestampType) t;\n                    return new TimestampWriter(localZonedTimestampType.getPrecision());\n                default:\n                    throw new UnsupportedOperationException(\"Unsupported type: \" + type);\n            }\n        } else {\n            GroupType groupType = type.asGroupType();\n            LogicalTypeAnnotation logicalType = type.getLogicalTypeAnnotation();\n\n            if (t instanceof ArrayType\n                    && logicalType instanceof LogicalTypeAnnotation.ListLogicalTypeAnnotation) {\n                return new ArrayWriter(((ArrayType) t).getElementType(), groupType);\n            } else if (t instanceof MapType\n                    && logicalType instanceof LogicalTypeAnnotation.MapLogicalTypeAnnotation) {\n                return new MapWriter(\n                        ((MapType) t).getKeyType(), ((MapType) t).getValueType(), groupType);\n            } else if (t instanceof MultisetType\n                    && logicalType instanceof LogicalTypeAnnotation.MapLogicalTypeAnnotation) {\n                return new MapWriter(\n                        ((MultisetType) t).getElementType(), new IntType(false), groupType);\n            } else if (t instanceof RowType && type instanceof GroupType) {\n                return new RowWriter((RowType) t, groupType);","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/row/ParquetRowDataWriter.java#L128-L164","documentation":"ParquetRowDataWriter.createWriter throws for primitive LogicalTypes it has no writer for (the switch's default branch). The writer covers CHAR, VARCHAR, BOOLEAN, INT families, BIGINT, FLOAT, DOUBLE and timestamps; anything else falling into the primitive case is unsupported.","triggerScenarios":"Writing a RowData whose primitive column type is outside the handled set - most commonly a distinct type not normalized, or future/new LogicalTypes hitting the default branch of the primitive switch.","commonSituations":"Custom LogicalType subclasses passed through instead of standard table types; type mismatches where a DECIMAL/DATE/TIME is unexpectedly routed (these are handled elsewhere, but a non-standard variant reaches the default).","solutions":["Inspect the reported type in the message; normalize it to a supported Flink LogicalType before writing","Cast/convert the column upstream (e.g. in SQL: CAST(col AS <supported type>))","Ensure you pass standard planner-produced RowData schemas, not hand-built LogicalType instances"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"static boolean isSupportedPrimitive(LogicalType t) {\n  switch (t.getTypeRoot()) {\n    case CHAR: case VARCHAR: case BOOLEAN: case TINYINT: case SMALLINT:\n    case INTEGER: case BIGINT: case FLOAT: case DOUBLE:\n    case TIMESTAMP_WITHOUT_TIME_ZONE: case TIMESTAMP_WITH_LOCAL_TIME_ZONE:\n      return true;\n    default: return false;\n  }\n}","typeGuard":null,"tryCatchPattern":"try { writer.write(row); } catch (UnsupportedOperationException e) { if (e.getMessage().startsWith(\"Unsupported type\")) { /* normalize/drop the offending column, rebuild writer */ } throw e; }","preventionTips":["Validate the RowType against supported roots before opening the parquet writer","Prefer planner-generated schemas over hand-built LogicalTypes","Cast exotic types to supported ones upstream in the SQL/DataStream pipeline"],"tags":["parquet","row-data","type-system","flink-sql"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}