prestodb/presto · error · IllegalArgumentException
Invalid property tpcds.use-varchar-type
Error message
Invalid property tpcds.use-varchar-type
What it means
TpcdsConnectorFactory.useVarcharType parses the connector catalog property 'tpcds.use-varchar-type' as a boolean. When the value is present but not a valid boolean string (parseBoolean throws NumberFormatException), it is rethrown as IllegalArgumentException with this message. It signals a malformed catalog configuration value rather than a runtime failure.
Source
Thrown at presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsConnectorFactory.java:138
}
private int getSplitsPerNode(Map<String, String> properties)
{
try {
return parseInt(firstNonNull(properties.get("tpcds.splits-per-node"), String.valueOf(defaultSplitsPerNode)));
}
catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid property tpcds.splits-per-node");
}
}
private boolean useVarcharType(Map<String, String> properties)
{
try {
return parseBoolean(firstNonNull(properties.get("tpcds.use-varchar-type"), String.valueOf(false)));
}
catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid property tpcds.use-varchar-type");
}
}
private boolean isWithNoSexism(Map<String, String> properties)
{
return parseBoolean(firstNonNull(properties.get("tpcds.with-no-sexism"), String.valueOf(false)));
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Set tpcds.use-varchar-type to exactly 'true' or 'false' in the catalog properties file
- Remove the property entirely (it defaults to false)
- Check for hidden whitespace or quoting in the properties value
- If setting properties in code, pass Boolean.toString(value)
Example fix
// before tpcds.use-varchar-type=yes // after tpcds.use-varchar-type=true
Defensive patterns
Strategy: validation
Validate before calling
String v = properties.get("tpcds.use-varchar-type");
if (v != null && !v.equalsIgnoreCase("true") && !v.equalsIgnoreCase("false")) {
throw new IllegalArgumentException("tpcds.use-varchar-type must be 'true' or 'false', got: " + v);
} Type guard
boolean isValidBoolean(String v) { return v == null || v.equalsIgnoreCase("true") || v.equalsIgnoreCase("false"); } Try / catch
try {
connectorFactory.create(name, properties);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("tpcds.use-varchar-type")) {
properties.put("tpcds.use-varchar-type", "false"); // fall back to default
} else { throw e; }
} Prevention
- Only use true/false literals in catalog .properties files
- Validate catalog properties in your deploy pipeline before rollout
- Avoid templating bugs by asserting no ${...} placeholders remain in properties
When it happens
Trigger: Creating a TPC-DS catalog whose properties map contains tpcds.use-varchar-type set to a value that parseBoolean cannot handle (e.g. 'yes', 'on', 'true ', an integer, or empty string).
Common situations: Typo in the catalog properties file (tpcds.use-varchar-type=yes instead of true); property set programmatically with a non-boolean string; environment-variable substitution leaving a bad value in tpcds.properties.
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/a3baf3e6c988be4b.
Report an issue: GitHub.