apache/seatunnel · warning

Range string split failed for table

Error message

Range string split failed for table {}, fallback to hash split

What it means

DynamicChunkSplitter.createStringStrategySplits() tries createStringRangeSplits() when the string split strategy is AUTO with RANGE chosen; any exception triggers this WARN and a fallback to hash-based string splits (if the dialect supports it), otherwise a single split.

Solutions

  1. Let the fallback happen (hash splits are correct)
  2. Set split.string-split-strategy = HASH directly to avoid the failed attempt
  3. Pick a numeric/timestamp split_key for predictable range splits

Example fix

// before
split.string-split-strategy = "AUTO"
// after
split.string-split-strategy = "HASH"
Defensive patterns

Strategy: fallback

Validate before calling

// sample values and pre-validate range comparability
boolean safe = sampleColumn(table, splitKey).stream()
    .allMatch(v -> v != null && isComparableString(v));
if (!safe) config.set("split.string-split-strategy", "HASH");

Prevention

When it happens

Trigger: RANGE string splitting throws at runtime — e.g. unparseable/odd string values breaking min/max computation, comparator issues with the column type, or collation-induced comparison failures.

Common situations: String keys containing mixed encodings or null-like edge values; dialects whose string comparison is not binary-safe; very skewed string distributions causing split computation failures.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/source/DynamicChunkSplitter.java:153

            throws Exception {
        StringSplitStrategy strategy = resolveStringSplitStrategy(table, splitKeyName);
        switch (strategy) {
            case NONE:
                return Collections.singletonList(
                        createSingleStringSplit(table, splitKeyName, splitKeyType));
            case HASH:
                if (jdbcDialect.supportHashSplitter()) {
                    return createStringColumnSplits(
                            table, splitKeyName, splitKeyType, config.getSplitSize());
                }
                return Collections.singletonList(
                        createSingleStringSplit(table, splitKeyName, splitKeyType));
            case RANGE:
                if (config.getStringSplitStrategy() == StringSplitStrategy.AUTO) {
                    try {
                        return createStringRangeSplits(table, splitKeyName, splitKeyType);
                    } catch (Exception e) {
                        log.warn(
                                "Range string split failed for table {}, fallback to hash split",
                                table.getTablePath(),
                                e);
                        if (jdbcDialect.supportHashSplitter()) {
                            return createStringColumnSplits(
                                    table, splitKeyName, splitKeyType, config.getSplitSize());
                        }
                        return Collections.singletonList(
                                createSingleStringSplit(table, splitKeyName, splitKeyType));
                    }
                }
                return createStringRangeSplits(table, splitKeyName, splitKeyType);
            default:
                throw new JdbcConnectorException(
                        CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
                        "Unsupported string split strategy: " + config.getStringSplitStrategy());
        }
    }

View on GitHub (pinned to cf67b549a7)