{"record":{"id":"eb9f067000c24a1a","repo":"apache/seatunnel","slug":"unknown-jsonarrow-type-defaulting-to-utf8","errorCode":null,"errorMessage":"Unknown JsonArrow type: {}, defaulting to utf8","messagePattern":"Unknown JsonArrow type: (.+?), defaulting to utf8","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java","lineNumber":559,"sourceCode":"            case \"utf8\":\n            case \"string\":\n                return new ArrowType.Utf8();\n            case \"binary\":\n                return new ArrowType.Binary();\n            case \"date32\":\n                return new ArrowType.Date(DateUnit.DAY);\n            case \"date64\":\n                return new ArrowType.Date(DateUnit.MILLISECOND);\n            case \"timestamp\":\n                return new ArrowType.Timestamp(TimeUnit.MICROSECOND, null);\n            case \"list\":\n                return new ArrowType.List();\n            case \"map\":\n                return new ArrowType.Map(false);\n            case \"decimal128\":\n                return new ArrowType.Decimal(38, 10, 128);\n            default:\n                log.warn(\"Unknown JsonArrow type: {}, defaulting to utf8\", type);\n                return new ArrowType.Utf8();\n        }\n    }\n}\n","sourceCodeStart":541,"sourceCodeEnd":564,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java#L541-L564","documentation":"LanceCatalog.convertJsonArrowTypeToArrowType converts a JSON-serialized Arrow type name back into an ArrowType object. Unrecognized type strings fall through to the default branch: a warning is logged and an ArrowType.Utf8 is returned, silently degrading the column type to string.","triggerScenarios":"Calling arrowType (used when reconstructing a SeaTunnel catalog schema) with a JsonArrow type string that is not one of the mapped cases (bool/int8..64/float/double/string/binary/list/map/decimal128 etc.), e.g. \"timestamp\", \"date32\", or \"duration\".","commonSituations":"Reading a table whose catalog JSON was produced by a newer writer that emitted type names this reader doesn't map; manual schema edits; round-trip asymmetry with convertArrowSchemaToJsonArrowSchema.","solutions":["Check the catalog JSON for the offending type name and map it to a supported one","Upgrade the connector so the conversion covers the type","Add the missing case to convertJsonArrowTypeToArrowType returning the correct ArrowType","Accept the utf8 fallback and cast downstream if the data is string-compatible"],"exampleFix":"// before\ndefault:\n    log.warn(\"Unknown JsonArrow type: {}, defaulting to utf8\", type);\n    return new ArrowType.Utf8();\n// after\ncase \"timestamp\":\n    return new ArrowType.Timestamp(TimeUnit.MILLISECOND, null);\ndefault:\n    log.warn(\"Unknown JsonArrow type: {}, defaulting to utf8\", type);\n    return new ArrowType.Utf8();","handlingStrategy":"fallback","validationCode":"// pre-check catalog JSON type strings against the supported set\njava.util.Set<String> supported = java.util.Set.of(\"bool\",\"int8\",\"int16\",\"int32\",\"int64\",\"float\",\"double\",\"string\",\"binary\",\"list\",\"map\",\"decimal128\");\nif (!supported.contains(typeName)) System.out.println(\"Type will degrade to utf8: \" + typeName);","typeGuard":null,"tryCatchPattern":"try { Schema st = table.schema(); } catch (Exception e) { log.warn(\"Schema types may fall back to utf8\", e); }","preventionTips":["Round-trip test schemas between writer and reader versions","Pin writer and reader to the same connector-lance version","Map new type names in convertJsonArrowTypeToArrowType before upgrading writers"],"tags":["arrow","lance","schema","type-mapping"],"backgroundTag":"unsupported-dtype","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"}