prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Invalid Iceberg table name:
What it means
IcebergTableName.from() parses a user-supplied table name (possibly with @version/#branch suffixes and internal table type suffixes like $partitions) against TABLE_PATTERN. If the name does not match the expected pattern at all, the connector throws NOT_SUPPORTED. This guards the Iceberg naming grammar (table[@version][#branch][$type]) before any metadata is loaded.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergTableName.java:124
return snapshotId;
}
public String getTableNameWithType()
{
return tableName + "$" + icebergTableType.name().toLowerCase(ROOT);
}
@Override
public String toString()
{
return getTableNameWithType() + snapshotId.map(snap -> "@" + snap).orElse("");
}
public static IcebergTableName from(String name)
{
Matcher match = TABLE_PATTERN.matcher(name);
if (!match.matches()) {
throw new PrestoException(NOT_SUPPORTED, "Invalid Iceberg table name: " + name);
}
String table = match.group("table");
String branch = match.group("branch");
String typeString = match.group("type");
String version1 = match.group("ver1");
String version2 = match.group("ver2");
// Branches cannot be combined with snapshot versions
if (branch != null && (version1 != null || version2 != null)) {
throw new PrestoException(NOT_SUPPORTED, format("Invalid Iceberg table name (cannot use @ version with branch): %s", name));
}
IcebergTableType type = DATA;
if (typeString != null) {
try {
type = IcebergTableType.valueOf(typeString.toUpperCase(ROOT));
}View on GitHub (pinned to 55bb57d202)
Solutions
- Print and inspect the exact name being passed; remove unsupported or duplicated '@', '#', '$' segments.
- Use only one version marker: either '@snapshotId' or '#branch', never both.
- Ensure the internal type suffix (if any) is a valid one like '$partitions', '$manifests', '$files', '$changelog'.
- If constructing names in code, use IcebergTableName methods/format helpers instead of string concatenation.
Example fix
// before
IcebergTableName.from("my_table@100@200")
// after
IcebergTableName.from("my_table@100") // one version, or "my_table#main" for a branch Defensive patterns
Strategy: validation
Validate before calling
String name = "events@100";
if (!name.matches("[^@#$]+(@\\d+)?(#[^@#$]+)?(\\$[a-zA-Z]+)?")) {
throw new IllegalArgumentException("Table name does not follow table[@version][#branch][$type]: " + name);
}
IcebergTableName.from(name); Type guard
boolean isValidIcebergTableName(String name) {
return name != null && !name.isBlank() &&
name.chars().filter(c -> c == '@').count() <= 1 &&
name.chars().filter(c -> c == '#').count() <= 1 &&
name.chars().filter(c -> c == '$').count() <= 1;
} Try / catch
try {
IcebergTableName n = IcebergTableName.from(name);
} catch (PrestoException e) {
if (e.getErrorCode() == NOT_SUPPORTED.toErrorCode()) {
log.warn("Unparseable Iceberg table name: %s", name);
} else { throw e; }
} Prevention
- Build names via IcebergTableName/Table helpers, never raw string concatenation
- Validate user-supplied table names against the table[@version][#branch][$type] grammar before calling the connector
- Allow only one of @version or #branch per name
- Unit-test name construction for all suffix combinations
When it happens
Trigger: Calling IcebergTableName.from(name) with a name that does not match TABLE_PATTERN — e.g. empty string, a name with multiple '@'/'#'/'$' markers, illegal characters, or a trailing/leading separator like 'tbl@' or 'tbl$'.
Common situations: Users typing table names with typos or extra suffixes in queries like 'SELECT * FROM catalog.schema.t1$files@123'; programmatic name construction that concatenates version and type suffixes incorrectly; migrating from other engines with different temp-table/branch syntax.
Understand the failure class
Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e3ae897bb1c5e8c5.
Report an issue: GitHub.