prestodb/presto · error · UnsupportedOperationException

partition-aware grouped execution requires an implementation

Error message

partition-aware grouped execution requires an implementation that supports partitionColumnMapping

What it means

SplitSourceProvider's default partition-aware getSplits overload throws UnsupportedOperationException: connectors must override this method to participate in partition-aware grouped execution. The default exists only so connectors without the feature still compile.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/split/SplitSourceProvider.java:30

 * limitations under the License.
 */
package com.facebook.presto.split;

import com.facebook.presto.Session;
import com.facebook.presto.metadata.TableFunctionHandle;
import com.facebook.presto.spi.TableHandle;
import com.facebook.presto.spi.WarningCollector;
import com.facebook.presto.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy;

import java.util.Map;

public interface SplitSourceProvider
{
    SplitSource getSplits(Session session, TableHandle tableHandle, SplitSchedulingStrategy splitSchedulingStrategy, WarningCollector warningCollector);

    default SplitSource getSplits(Session session, TableHandle tableHandle, SplitSchedulingStrategy splitSchedulingStrategy, WarningCollector warningCollector, Map<String, String> partitionColumnMapping)
    {
        throw new UnsupportedOperationException("partition-aware grouped execution requires an implementation that supports partitionColumnMapping");
    }

    SplitSource getSplits(Session session, TableFunctionHandle tableFunctionHandle);
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Disable partition-aware grouped execution for sessions using this connector (session property controlling the feature)
  2. Implement the partitionColumnMapping overload in the connector's SplitSourceProvider and delegate appropriately to the underlying metadata/broker
  3. Upgrade the connector plugin to a version that supports partition-aware split fetching
  4. Restrict the feature flag to connectors known to support it (e.g. built-in connectors)

Example fix

// before (connector provider)
@Override
public SplitSource getSplits(Session session, TableHandle table, SplitSchedulingStrategy strategy, WarningCollector warnings) {...}
// after
@Override
public SplitSource getSplits(Session session, TableHandle table, SplitSchedulingStrategy strategy, WarningCollector warnings, Map<String, String> partitionColumnMapping) {
    return partitionAwareSplits(session, table, strategy, warnings, partitionColumnMapping);
}
Defensive patterns

Strategy: fallback

Validate before calling

// feature flag check before enabling partition-aware grouped execution
boolean supported = splitSourceProviderOverridesPartitionMapping(connectorName);
if (!supported) { /* keep partitionColumnMapping empty or disable the flag */ }

Try / catch

try { return provider.getSplits(session, handle, strategy, warnings, mapping); } catch (UnsupportedOperationException e) { return provider.getSplits(session, handle, strategy, warnings); }

Prevention

When it happens

Trigger: Grouped execution with partition awareness is enabled (e.g. partition-aware grouped execution feature flag on) and the engine calls getSplits(session, tableHandle, strategy, warningCollector, partitionColumnMapping) on a connector whose SplitSourceProvider does not override the 5-argument overload.

Common situations: Turning on partition-aware grouped execution session/system properties with connectors that have not implemented the new API; running a newer query plan against an older custom connector plugin.

Related errors


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