{"record":{"id":"93e8730d3baa7357","repo":"apache/beam","slug":"unsigned-integers-are-not-supported","errorCode":null,"errorMessage":"Unsigned integers are not supported.","messagePattern":"Unsigned integers are 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":176,"sourceCode":"                        \"Type \\'\" + type.toString() + \"\\' not supported.\");\n                  }\n\n                  @Override\n                  public FieldType visit(ArrowType.Map type) {\n                    checkArgument(\n                        childrenFields.size() == 2,\n                        \"Encountered \"\n                            + childrenFields.size()\n                            + \" child fields for map type, expected 2\");\n                    return FieldType.map(\n                        toBeamField(childrenFields.get(0)).getType(),\n                        toBeamField(childrenFields.get(1)).getType());\n                  }\n\n                  @Override\n                  public FieldType visit(ArrowType.Int type) {\n                    if (!type.getIsSigned()) {\n                      throw new IllegalArgumentException(\"Unsigned integers are not supported.\");\n                    }\n                    switch (type.getBitWidth()) {\n                      case 8:\n                        return FieldType.BYTE;\n                      case 16:\n                        return FieldType.INT16;\n                      case 32:\n                        return FieldType.INT32;\n                      case 64:\n                        return FieldType.INT64;\n                      default:\n                        throw new IllegalArgumentException(\n                            \"Unsupported integer bit width: \" + type.getBitWidth());\n                    }\n                  }\n\n                  @Override\n                  public FieldType visit(ArrowType.FloatingPoint type) {","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/arrow/src/main/java/org/apache/beam/sdk/extensions/arrow/ArrowConversion.java#L158-L194","documentation":"While converting an Arrow field type to a Beam schema field type, the visitor hit an Arrow unsigned integer type (UInt8/16/32/64). Beam's schema type system has no unsigned integer types, so the conversion refuses rather than silently narrowing; the Arrow uint field being converted is the input at fault.","triggerScenarios":"Converting Arrow schemas with unsigned integer columns (uint8/uint16/uint32/uint64) — typical of data read from Parquet/CSV/NumPy that used unsigned types.","commonSituations":"pyarrow arrays built from numpy uint arrays; Parquet files storing unsigned logical types; bitmap/ID columns encoded as uint64.","solutions":["Cast unsigned columns to the next-wider signed type (uint32 -> int64) before conversion","Cast to string if values may exceed signed range and parse in Beam","Drop or remap the unsigned fields from the Arrow schema","Catch IllegalArgumentException and widen the column automatically when detecting getIsSigned()==false"],"exampleFix":"// before\npa.array(np.array([1,2,3], dtype=np.uint32))\n// after\npa.array(np.array([1,2,3], dtype=np.int64))","handlingStrategy":"validation","validationCode":"for (org.apache.arrow.vector.types.pojo.Field f : arrowSchema.getFields()) {\n  if (f.getType() instanceof ArrowType.Int && !((ArrowType.Int) f.getType()).getIsSigned()) {\n    throw new IllegalArgumentException(\"Unsigned column: \" + f.getName());\n  }\n}","typeGuard":null,"tryCatchPattern":"try { beamSchema = toBeamSchema(arrowSchema); } catch (IllegalArgumentException e) { arrowSchema = widenUnsignedToInt64(arrowSchema); beamSchema = toBeamSchema(arrowSchema); }","preventionTips":["Use signed integer dtypes in numpy/pandas before pyarrow conversion","Widen uint32/uint64 to int64 at ingest","Check getIsSigned() when building interchange schemas"],"tags":["java","arrow","unsigned-integer","beam-schema"],"backgroundTag":"unsupported-dtype","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}