prestodb/presto · error · IllegalArgumentException

`tpcds.use-varchar-type` config property is not true for a n

Error message

`tpcds.use-varchar-type` config property is not true for a native cluster

What it means

TpcdsConnectorFactory.create() validates that when native execution is enabled for the cluster, the tpcds.use-varchar-type config property is true. The Java TPC-DS connector can serve char columns, but native workers only support varchar, so a mismatch would produce unusable column types. It throws IllegalArgumentException at connector creation time to fail fast.

Source

Thrown at presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsConnectorFactory.java:74

    {
        return "tpcds";
    }

    @Override
    public ConnectorHandleResolver getHandleResolver()
    {
        return new TpcdsHandleResolver();
    }

    @Override
    public Connector create(String catalogName, Map<String, String> config, ConnectorContext context)
    {
        int splitsPerNode = getSplitsPerNode(config);
        // The Java TPC-DS connector works with either char or varchar columns.
        // However, native execution only supports varchar columns, hence in a native cluster `tpcds.use-varchar-type` must be true.
        boolean useVarcharType = useVarcharType(config);
        if (context.getConnectorSystemConfig().isNativeExecution() && !(useVarcharType)) {
            throw new IllegalArgumentException("`tpcds.use-varchar-type` config property is not true for a native cluster");
        }

        NodeManager nodeManager = context.getNodeManager();
        return new Connector()
        {
            @Override
            public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
            {
                return TpcdsTransactionHandle.INSTANCE;
            }

            @Override
            public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle)
            {
                return new TpcdsMetadata(useVarcharType);
            }

            @Override

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set tpcds.use-varchar-type=true in the TPCDS catalog properties file
  2. Disable native execution for this catalog/cluster if char types are required
  3. Verify with the config loader that the property is actually picked up (correct catalog file, no typos)

Example fix

// before
tpcds.use-varchar-type=false
// after
tpcds.use-varchar-type=true
Defensive patterns

Strategy: validation

Validate before calling

boolean native = config.isNativeExecution();
boolean varchar = Boolean.parseBoolean(properties.getOrDefault("tpcds.use-varchar-type", "false"));
if (native && !varchar) {
    throw new IllegalArgumentException("set tpcds.use-varchar-type=true for native clusters");
}

Prevention

When it happens

Trigger: Creating the TPCDS connector (catalog startup) with native execution enabled in ConnectorSystemConfig while tpcds.use-varchar-type=false (or unset to a non-true value).

Common situations: Deploying a hybrid/native Presto cluster with an existing TPCDS catalog config; copying catalog properties from a Java-only cluster into a native cluster; forgetting the tpcds.use-varchar-type=true line.

Related errors


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