{"record":{"id":"4f97be7caef39a21","repo":"apache/beam","slug":"type-type-not-supported","errorCode":null,"errorMessage":"Type '${type}' not supported.","messagePattern":"Type '(.+?)' not supported\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/arrow/src/main/java/org/apache/beam/sdk/extensions/arrow/ArrowConversion.java","lineNumber":130,"sourceCode":"\n  /** Get Beam Field from Arrow Field. */\n  private static Field toBeamField(org.apache.arrow.vector.types.pojo.Field field) {\n    FieldType beamFieldType = toFieldType(field.getFieldType(), field.getChildren());\n    return Field.of(field.getName(), beamFieldType);\n  }\n\n  /** Converts Arrow FieldType to Beam FieldType. */\n  private static FieldType toFieldType(\n      org.apache.arrow.vector.types.pojo.FieldType arrowFieldType,\n      List<org.apache.arrow.vector.types.pojo.Field> childrenFields) {\n    FieldType fieldType =\n        arrowFieldType\n            .getType()\n            .accept(\n                new ArrowType.ArrowTypeVisitor<FieldType>() {\n                  @Override\n                  public FieldType visit(ArrowType.Null type) {\n                    throw new IllegalArgumentException(\n                        \"Type \\'\" + type.toString() + \"\\' not supported.\");\n                  }\n\n                  @Override\n                  public FieldType visit(ArrowType.Struct type) {\n                    return FieldType.row(ArrowSchemaTranslator.toBeamSchema(childrenFields));\n                  }\n\n                  @Override\n                  public FieldType visit(ArrowType.List type) {\n                    checkArgument(\n                        childrenFields.size() == 1,\n                        \"Encountered \"\n                            + childrenFields.size()\n                            + \" child fields for list type, expected 1\");\n                    return FieldType.array(toBeamField(childrenFields.get(0)).getType());\n                  }\n","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/arrow/src/main/java/org/apache/beam/sdk/extensions/arrow/ArrowConversion.java#L112-L148","documentation":"During Arrow-to-Beam field conversion, the ArrowTypeVisitor's visit(ArrowType.Null) rejects Arrow null types outright — Beam Schema has no direct equivalent, so conversion throws with the Arrow type string in the message.","triggerScenarios":"toBeamSchema/toBeamField called on an Arrow schema that contains a field of ArrowType.Null (columns of all-null with null type, common from CSV/pandas inference).","commonSituations":"Ingesting Arrow data produced by pandas/pyarrow where a fully-null column was inferred as null type; Parquet files with null-typed columns.","solutions":["Cast or drop the null-typed column before conversion (e.g. pyarrow cast to a concrete type)","Pre-scan the Arrow schema for ArrowType.Null and remove those fields","Replace the field with a nullable string/int field in the Arrow schema","Catch IllegalArgumentException and treat the column as nullable string if needed"],"exampleFix":"// before\nSchema beam = ArrowConversion.ArrowSchemaTranslator.toBeamSchema(arrowSchema); // has null-type col\n// after (Python side)\ntable = table.set_column(i, table.schema.field('c').cast(pa.string()))","handlingStrategy":"validation","validationCode":"boolean hasNullType = java.util.stream.IntStream.range(0, arrowSchema.getFields().size())\n    .anyMatch(i -> arrowSchema.getFields().get(i).getType().getTypeID()\n        == ArrowType.Null.INSTANCE.getTypeID());","typeGuard":null,"tryCatchPattern":"try { beamSchema = toBeamSchema(arrowSchema); } catch (IllegalArgumentException e) { arrowSchema = removeNullColumns(arrowSchema); beamSchema = toBeamSchema(arrowSchema); }","preventionTips":["Cast all-null columns to a concrete type at the producer","Validate Arrow schemas before sending cross-language","Prefer explicit schemas over inference in pyarrow"],"tags":["java","arrow","beam-schema","type-conversion"],"backgroundTag":"unsupported-dtype","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}