{"record":{"id":"a3baf3e6c988be4b","repo":"prestodb/presto","slug":"invalid-property-tpcds-use-varchar-type","errorCode":null,"errorMessage":"Invalid property tpcds.use-varchar-type","messagePattern":"Invalid property tpcds\\.use-varchar-type","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsConnectorFactory.java","lineNumber":138,"sourceCode":"    }\n\n    private int getSplitsPerNode(Map<String, String> properties)\n    {\n        try {\n            return parseInt(firstNonNull(properties.get(\"tpcds.splits-per-node\"), String.valueOf(defaultSplitsPerNode)));\n        }\n        catch (NumberFormatException e) {\n            throw new IllegalArgumentException(\"Invalid property tpcds.splits-per-node\");\n        }\n    }\n\n    private boolean useVarcharType(Map<String, String> properties)\n    {\n        try {\n            return parseBoolean(firstNonNull(properties.get(\"tpcds.use-varchar-type\"), String.valueOf(false)));\n        }\n        catch (NumberFormatException e) {\n            throw new IllegalArgumentException(\"Invalid property tpcds.use-varchar-type\");\n        }\n    }\n\n    private boolean isWithNoSexism(Map<String, String> properties)\n    {\n        return parseBoolean(firstNonNull(properties.get(\"tpcds.with-no-sexism\"), String.valueOf(false)));\n    }\n}\n","sourceCodeStart":120,"sourceCodeEnd":147,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsConnectorFactory.java#L120-L147","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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)"],"exampleFix":"// before\ntpcds.use-varchar-type=yes\n// after\ntpcds.use-varchar-type=true","handlingStrategy":"validation","validationCode":"String v = properties.get(\"tpcds.use-varchar-type\");\nif (v != null && !v.equalsIgnoreCase(\"true\") && !v.equalsIgnoreCase(\"false\")) {\n    throw new IllegalArgumentException(\"tpcds.use-varchar-type must be 'true' or 'false', got: \" + v);\n}","typeGuard":"boolean isValidBoolean(String v) { return v == null || v.equalsIgnoreCase(\"true\") || v.equalsIgnoreCase(\"false\"); }","tryCatchPattern":"try {\n    connectorFactory.create(name, properties);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"tpcds.use-varchar-type\")) {\n        properties.put(\"tpcds.use-varchar-type\", \"false\"); // fall back to default\n    } else { throw e; }\n}","preventionTips":["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"],"tags":["configuration","tpcds","connector"],"backgroundTag":"invalid-connector-config-property","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}