{"record":{"id":"90cabadfda24533d","repo":"apache/beam","slug":"unsupported-beam-type-for-arrowflightio-write-type","errorCode":null,"errorMessage":"Unsupported Beam type for ArrowFlightIO.write(): type.getTypeName()","messagePattern":"Unsupported Beam type for ArrowFlightIO\\.write\\(\\): type\\.getTypeName\\(\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/arrow-flight/src/main/java/org/apache/beam/sdk/io/arrowflight/ArrowFlightIO.java","lineNumber":773,"sourceCode":"          break;\n        case STRING:\n          ((VarCharVector) vector)\n              .setSafe(index, value.toString().getBytes(StandardCharsets.UTF_8));\n          break;\n        case BYTES:\n          ((VarBinaryVector) vector).setSafe(index, (byte[]) value);\n          break;\n        case DATETIME:\n          long millis;\n          if (value instanceof org.joda.time.ReadableInstant) {\n            millis = ((org.joda.time.ReadableInstant) value).getMillis();\n          } else {\n            millis = ((Number) value).longValue();\n          }\n          ((TimeStampMilliTZVector) vector).setSafe(index, millis);\n          break;\n        default:\n          throw new IllegalArgumentException(\n              \"Unsupported Beam type for ArrowFlightIO.write(): \" + type.getTypeName());\n      }\n    }\n\n    private void closeConnection() {\n      RuntimeException failure = null;\n      FlightClient.ClientStreamListener currentListener = listener;\n      listener = null;\n      try {\n        if (currentListener != null) {\n          currentListener.completed();\n          currentListener.getResult();\n        }\n      } catch (RuntimeException e) {\n        failure = e;\n      }\n\n      VectorSchemaRoot currentRoot = root;","sourceCodeStart":755,"sourceCodeEnd":791,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/arrow-flight/src/main/java/org/apache/beam/sdk/io/arrowflight/ArrowFlightIO.java#L755-L791","documentation":"During ArrowFlightIO.write's vector population, a Beam Schema FieldType was encountered that has no Arrow vector write path; the default branch throws IllegalArgumentException('Unsupported Beam type for ArrowFlightIO.write(): <typeName>'). The sink cannot convert that column type to Arrow.","triggerScenarios":"Writing a Row whose schema contains a field type not handled by the writer's switch over type.getTypeName() (e.g., certain nested, map, or logical types).","commonSituations":"Schemas inferred from data with unsupported types, ROW/MAP/ARRAY combos not covered by the writer, version gaps between Beam type system and implemented Arrow writers.","solutions":["Identify the offending field from the message and convert it to a supported primitive type before write().","Flatten or serialize nested structures to strings/bytes.","Check supported types in ArrowFlightIO's writer switch and shape the schema accordingly.","Upgrade Beam — newer versions may have added support for the type."],"exampleFix":"// before\nschema with field 'meta' of unsupported nested type\n.apply(ArrowFlightIO.write());\n// after\nrow.set(\"meta\", metaToJsonString(meta)); // STRING is supported\n.apply(ArrowFlightIO.write());","handlingStrategy":"validation","validationCode":"// pre-check that every schema field has a supported Arrow write path\nSchema schema = pcoll.getSchema();\nschema.getFields().forEach(f -> requireSupportedByArrowFlightWriter(f.getType()));","typeGuard":null,"tryCatchPattern":"try {\n  pcoll.apply(ArrowFlightIO.write());\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().startsWith(\"Unsupported Beam type for ArrowFlightIO.write()\")) {\n    log.error(\"Column type not supported by the Arrow writer\", e);\n  }\n}","preventionTips":["Whitelist supported field types before building the sink schema","Convert nested/exotic fields to STRING or BYTES upstream","Add unit tests covering your production schema against ArrowFlightIO","Upgrade Beam when new Arrow type support is needed"],"tags":["arrow-flight","unsupported-type","schema","write"],"backgroundTag":"type-mismatch","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}