prestodb/presto · error · UnsupportedOperationException
lookup is not supported
Error message
lookup is not supported
What it means
ThriftTpchService.createLookupPageSource() throws UnsupportedOperationException because the base TPCH testing service does not implement lookup (indexed) page sources. It exists as an extension hook for subclasses like ThriftIndexedTpchService. Any call on the base class means a lookup split was routed to a service that cannot serve it.
Source
Thrown at presto-thrift-testing-server/src/main/java/com/facebook/presto/connector/thrift/server/ThriftTpchService.java:207
PrestoThriftNullableToken nextToken)
{
SplitInfo splitInfo = SPLIT_INFO_CODEC.fromJson(splitId.getId());
checkArgument(maxBytes >= DEFAULT_MAX_PAGE_SIZE_IN_BYTES, "requested maxBytes is too small");
ConnectorPageSource pageSource;
if (!splitInfo.isIndexSplit()) {
// normal scan
pageSource = createPageSource(splitInfo, outputColumns);
}
else {
// index lookup
pageSource = createLookupPageSource(splitInfo, outputColumns);
}
return getRowsInternal(pageSource, splitInfo.getTableName(), outputColumns, nextToken.getToken());
}
protected ConnectorPageSource createLookupPageSource(SplitInfo splitInfo, List<String> outputColumnNames)
{
throw new UnsupportedOperationException("lookup is not supported");
}
@PreDestroy
@Override
public final void close()
{
executor.shutdownNow();
}
public static List<Type> types(String tableName, List<String> columnNames)
{
TpchTable<?> table = TpchTable.getTable(tableName);
return columnNames.stream().map(name -> getPrestoType(table.getColumn(name))).collect(toList());
}
public static double schemaNameToScaleFactor(String schemaName)
{
switch (schemaName) {View on GitHub (pinned to 55bb57d202)
Solutions
- Override createLookupPageSource() in your ThriftTpchService subclass to return a real lookup page source
- Route lookup splits to a service that supports them (e.g., ThriftIndexedTpchService)
- Ensure split IDs are only sent back to the service that produced them
- If lookups are not needed, prevent plans that generate lookup splits
Example fix
// before
class MyService extends ThriftTpchService { } // throws on lookup
// after
class MyService extends ThriftTpchService {
@Override
protected ConnectorPageSource createLookupPageSource(SplitInfo splitInfo, List<String> outputColumnNames) {
return new MyLookupPageSource(splitInfo, outputColumnNames);
}
} Defensive patterns
Strategy: type-guard
Type guard
boolean supportsLookup(ThriftTpchService service) {
return !(service.getClass() == ThriftTpchService.class);
} Prevention
- Override createLookupPageSource in subclasses that generate lookup splits
- Only send split IDs back to the service instance that created them
- Keep lookup support and split generation in the same service class
When it happens
Trigger: getRowsSync() receives a SplitInfo representing a lookup/index split while running on the base ThriftTpchService (or a subclass that did not override createLookupPageSource).
Common situations: A custom service subclass forgot to override createLookupPageSource; index splits generated elsewhere get fetched from the non-index service; misconfigured test server wiring.
Related errors
- Index join is not supported
- Only bigint, integer and varchar blocks are supported
- Schema is not setup:
- Table not setup:
- SingleMapBlock does not support appendNull()
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/1205687958abb389.
Report an issue: GitHub.