{"record":{"id":"a9e8f3719cd5cc49","repo":"apache/seatunnel","slug":"the-string-type-in-starrocks-can-only-store-up-to","errorCode":null,"errorMessage":"The String type in StarRocks can only store up to 2GB bytes, and the current field [%s] length is [%s] bytes. If it is greater than the maximum length of the String in Doris, it may not be able to write data","messagePattern":"The String type in StarRocks can only store up to 2GB bytes, and the current field \\[(.+?)\\] length is \\[(.+?)\\] bytes\\. If it is greater than the maximum length of the String in Doris, it may not be able to write data","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java","lineNumber":617,"sourceCode":"                builder.columnType(String.format(\"%s(%s)\", SR_CHAR, column.getColumnLength()));\n                builder.dataType(SR_CHAR);\n            }\n            return;\n        }\n\n        if (column.getColumnLength() <= 65533) {\n            builder.columnType(String.format(\"%s(%s)\", SR_VARCHAR, column.getColumnLength()));\n            builder.dataType(SR_VARCHAR);\n            return;\n        }\n\n        if (column.getColumnLength() <= MAX_STRING_LENGTH) {\n            builder.columnType(SR_STRING);\n            builder.dataType(SR_STRING);\n            return;\n        }\n\n        log.warn(\n                String.format(\n                        \"The String type in StarRocks can only store up to 2GB bytes, and the current field [%s] length is [%s] bytes. If it is greater than the maximum length of the String in Doris, it may not be able to write data\",\n                        column.getName(), column.getColumnLength()));\n        builder.columnType(SR_STRING);\n        builder.dataType(SR_STRING);\n    }\n\n    private void reconvertMap(\n            Column column, BasicTypeDefine.BasicTypeDefineBuilder<StarRocksType> builder) {\n        MapType dataType = (MapType) column.getDataType();\n        SeaTunnelDataType keyType = dataType.getKeyType();\n        SeaTunnelDataType valueType = dataType.getValueType();\n        Column keyColumn =\n                PhysicalColumn.of(\n                        column.getName() + \".key\",\n                        (SeaTunnelDataType<?>) keyType,\n                        (Long) null,\n                        true,","sourceCodeStart":599,"sourceCodeEnd":635,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java#L599-L635","documentation":"StarRocks STRING columns can hold at most 2GB. When a source string column's declared length exceeds MAX_STRING_LENGTH, this warning notes the oversized field; the connector still maps it to STRING, but very large values may fail to write (message text mentions Doris due to shared code).","triggerScenarios":"reconvertString -> sampleReconvertString is given a string column whose getColumnLength() exceeds 2GB (2147483648 bytes).","commonSituations":"Sources declaring varchar/max or text columns with unbounded/absurd lengths (e.g. LongText mapped to MAX_VALUE); metadata reporting length in different units inflating the value.","solutions":["Cap the source column length to a realistic value under 2GB","Cast oversized columns to a smaller bounded type via a transform before the sink","If truly huge payloads exist, consider external object storage plus a reference column instead of inline strings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (col.getSqlType() == StringType && col.getColumnLength() > 2147483648L) {\n  throw new IllegalArgumentException(\"Column \" + col.getName() + \" exceeds StarRocks 2GB string limit\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bound source string column lengths to realistic values","Externalize very large payloads to object storage","Watch for source engines reporting huge/undefined lengths (LongText, varchar(max))"],"tags":["string","length-limit","type-conversion","starrocks"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}