{"record":{"id":"be7ce18296c1a10c","repo":"apache/seatunnel","slug":"list-as-map-value-not-yet-implemented","errorCode":null,"errorMessage":"List as map value not yet implemented","messagePattern":"List as map value not yet implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/sink/writers/ListTypeWriter.java","lineNumber":54,"sourceCode":"                \"List type should be handled via FragmentConverter.writeListToVector\");\n    }\n\n    @Override\n    public void writeToListWriter(\n            UnionListWriter writer, ArrowType arrowType, Object value, BufferAllocator allocator) {\n        throw new UnsupportedOperationException(\"Nested list writing not yet implemented\");\n    }\n\n    @Override\n    public void writeToMapKey(\n            UnionMapWriter writer, ArrowType arrowType, Object value, BufferAllocator allocator) {\n        throw new UnsupportedOperationException(\"List as map key is not supported\");\n    }\n\n    @Override\n    public void writeToMapValue(\n            UnionMapWriter writer, ArrowType arrowType, Object value, BufferAllocator allocator) {\n        throw new UnsupportedOperationException(\"List as map value not yet implemented\");\n    }\n}\n","sourceCodeStart":36,"sourceCodeEnd":57,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/sink/writers/ListTypeWriter.java#L36-L57","documentation":"ListTypeWriter.writeToMapValue rejects ARRAY values used as MAP values in the Lance sink. The implementation is a placeholder — nested list writing inside Arrow map value vectors has not been implemented in this connector. It throws UnsupportedOperationException unconditionally.","triggerScenarios":"A SeaTunnel row's MAP field is declared with an ARRAY (list) value type; when FragmentConverter writes each entry, the value dispatch reaches ListTypeWriter.writeToMapValue, which always throws.","commonSituations":"Schema like map<string, array<int>> (e.g. tags per user, labels per id) synced into Lance; users migrating from other sinks that support nested map values assuming Lance connector parity.","solutions":["Flatten the nested structure: use one row per key/element pair, or store the list as a JSON string column inside the map.","Restructure the schema to LIST<STRUCT<key, value>> instead of MAP<K, LIST<V>>.","Implement writeToMapValue in ListTypeWriter using the UnionMapWriter's value writer API if you maintain a fork.","Check connector release notes for when nested map-value writing is implemented before relying on it."],"exampleFix":"// before: map with list value\ncolumns = \"tags map<string, array<string>>\"\n\n// after: JSON-encoded value\ncolumns = \"tags map<string, string>\"  // value = JSON string of the list","handlingStrategy":"validation","validationCode":"// Java: reject list map-values before writing\nArrowType valueType = mapField.getChildren().get(1).getType();\nif (valueType instanceof ArrowType.List) {\n    throw new IllegalArgumentException(\"map value cannot be a list in Lance sink; use JSON string or struct list\");\n}","typeGuard":"boolean isSupportedMapValue(ArrowType t) {\n    return !(t instanceof ArrowType.List) && !(t instanceof ArrowType.Map);\n}","tryCatchPattern":null,"preventionTips":["Prefer map<string,string> with JSON-encoded values for nested data","Check the connector's supported-type matrix before designing nested schemas","Validate the Arrow schema (children types) before job submission"],"tags":["lance","arrow","map-value","nested-type","sink"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}