apache/seatunnel · warning

Unknown JsonArrow type: {}, defaulting to utf8

Error message

Unknown JsonArrow type: {}, defaulting to utf8

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java:559

            case "utf8":
            case "string":
                return new ArrowType.Utf8();
            case "binary":
                return new ArrowType.Binary();
            case "date32":
                return new ArrowType.Date(DateUnit.DAY);
            case "date64":
                return new ArrowType.Date(DateUnit.MILLISECOND);
            case "timestamp":
                return new ArrowType.Timestamp(TimeUnit.MICROSECOND, null);
            case "list":
                return new ArrowType.List();
            case "map":
                return new ArrowType.Map(false);
            case "decimal128":
                return new ArrowType.Decimal(38, 10, 128);
            default:
                log.warn("Unknown JsonArrow type: {}, defaulting to utf8", type);
                return new ArrowType.Utf8();
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the catalog JSON for the offending type name and map it to a supported one
  2. Upgrade the connector so the conversion covers the type
  3. Add the missing case to convertJsonArrowTypeToArrowType returning the correct ArrowType
  4. Accept the utf8 fallback and cast downstream if the data is string-compatible

Example fix

// before
default:
    log.warn("Unknown JsonArrow type: {}, defaulting to utf8", type);
    return new ArrowType.Utf8();
// after
case "timestamp":
    return new ArrowType.Timestamp(TimeUnit.MILLISECOND, null);
default:
    log.warn("Unknown JsonArrow type: {}, defaulting to utf8", type);
    return new ArrowType.Utf8();
Defensive patterns

Strategy: fallback

Validate before calling

// pre-check catalog JSON type strings against the supported set
java.util.Set<String> supported = java.util.Set.of("bool","int8","int16","int32","int64","float","double","string","binary","list","map","decimal128");
if (!supported.contains(typeName)) System.out.println("Type will degrade to utf8: " + typeName);

Try / catch

try { Schema st = table.schema(); } catch (Exception e) { log.warn("Schema types may fall back to utf8", e); }

Prevention

When it happens

Trigger: 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".

Common situations: 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.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/eb9f067000c24a1a. Report an issue: GitHub.