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
- Set tpch.splits-per-node to a valid integer (e.g. 4) in the catalog properties
- Remove the property to use the defaultSplitsPerNode value
- Check for unresolved variable placeholders or whitespace in tpch.properties
- 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
- Use plain integers in tpch.properties; no decimals or units
- Assert templated properties have no unresolved placeholders
- Lint catalog property files as part of CI/deployment
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
- ARROW_INTERNAL_ERROR
- JDBC_ERROR
- Could not create hudi connector for catalog
- INVALID_SESSION_PROPERTY
- RuntimeException(e)
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/d7bfd7fb5273c62a.
Report an issue: GitHub.