prestodb/presto · error · IllegalArgumentException

Invalid property tpch.splits-per-node

Error message

Invalid property tpch.splits-per-node

What it means

TpchConnectorFactory.getSplitsPerNode parses the 'tpch.splits-per-node' catalog property as an int; on NumberFormatException it throws IllegalArgumentException 'Invalid property tpch.splits-per-node'. Like the TPC-DS counterpart, this signals a malformed integer value in catalog configuration.

Source

Thrown at presto-tpch/src/main/java/com/facebook/presto/tpch/TpchConnectorFactory.java:117

            {
                return new TpchRecordSetProvider();
            }

            @Override
            public ConnectorNodePartitioningProvider getNodePartitioningProvider()
            {
                return new TpchNodePartitioningProvider(nodeManager, splitsPerNode);
            }
        };
    }

    protected int getSplitsPerNode(Map<String, String> properties)
    {
        try {
            return Integer.parseInt(firstNonNull(properties.get("tpch.splits-per-node"), String.valueOf(defaultSplitsPerNode)));
        }
        catch (NumberFormatException e) {
            throw new IllegalArgumentException("Invalid property tpch.splits-per-node");
        }
    }

    protected boolean isPartitioningEnabled(Map<String, String> properties)
    {
        return Boolean.parseBoolean(properties.getOrDefault("tpch.partitioning-enabled", String.valueOf(partitioningEnabled)));
    }

    protected boolean isPredicatePushdownEnabled()
    {
        return predicatePushdownEnabled;
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set tpch.splits-per-node to a valid integer (e.g. 4) in the catalog properties
  2. Remove the property to use the defaultSplitsPerNode value
  3. Check for unresolved variable placeholders or whitespace in tpch.properties
  4. Validate all catalog properties after templating/deploy pipelines run

Example fix

// before
tpch.splits-per-node=${SPLITS_PER_NODE}
// after
tpch.splits-per-node=4
Defensive patterns

Strategy: validation

Validate before calling

String v = properties.get("tpch.splits-per-node");
if (v != null && !v.matches("\\d+")) {
    throw new IllegalArgumentException("tpch.splits-per-node must be a non-negative integer, got: " + v);
}

Type guard

boolean isValidInt(String v) { if (v == null) return true; try { Integer.parseInt(v.trim()); return true; } catch (NumberFormatException e) { return false; } }

Try / catch

try {
    connectorFactory.create(name, properties);
} catch (IllegalArgumentException e) {
    if (e.getMessage().contains("tpch.splits-per-node")) {
        properties.remove("tpch.splits-per-node"); // fall back to default
        connectorFactory.create(name, properties);
    } else { throw e; }
}

Prevention

When it happens

Trigger: Creating/using a TPC-H catalog where tpch.splits-per-node is set to a non-integer string (e.g. 'many', '2.5', empty, or with whitespace).

Common situations: Typo or bad substitution in tpch.properties; decimal number given instead of integer; leftover placeholder text like ${SPLITS} not resolved by the deploy tooling.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/d7bfd7fb5273c62a. Report an issue: GitHub.