{"record":{"id":"e3ae897bb1c5e8c5","repo":"prestodb/presto","slug":"not-supported-e3ae89","errorCode":"NOT_SUPPORTED","errorMessage":"Invalid Iceberg table name: ","messagePattern":"Invalid Iceberg table name: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergTableName.java","lineNumber":124,"sourceCode":"        return snapshotId;\n    }\n\n    public String getTableNameWithType()\n    {\n        return tableName + \"$\" + icebergTableType.name().toLowerCase(ROOT);\n    }\n\n    @Override\n    public String toString()\n    {\n        return getTableNameWithType() + snapshotId.map(snap -> \"@\" + snap).orElse(\"\");\n    }\n\n    public static IcebergTableName from(String name)\n    {\n        Matcher match = TABLE_PATTERN.matcher(name);\n        if (!match.matches()) {\n            throw new PrestoException(NOT_SUPPORTED, \"Invalid Iceberg table name: \" + name);\n        }\n\n        String table = match.group(\"table\");\n        String branch = match.group(\"branch\");\n        String typeString = match.group(\"type\");\n        String version1 = match.group(\"ver1\");\n        String version2 = match.group(\"ver2\");\n\n        // Branches cannot be combined with snapshot versions\n        if (branch != null && (version1 != null || version2 != null)) {\n            throw new PrestoException(NOT_SUPPORTED, format(\"Invalid Iceberg table name (cannot use @ version with branch): %s\", name));\n        }\n\n        IcebergTableType type = DATA;\n        if (typeString != null) {\n            try {\n                type = IcebergTableType.valueOf(typeString.toUpperCase(ROOT));\n            }","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergTableName.java#L106-L142","documentation":"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.","triggerScenarios":"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$'.","commonSituations":"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.","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."],"exampleFix":"// before\nIcebergTableName.from(\"my_table@100@200\")\n// after\nIcebergTableName.from(\"my_table@100\") // one version, or \"my_table#main\" for a branch","handlingStrategy":"validation","validationCode":"String name = \"events@100\";\nif (!name.matches(\"[^@#$]+(@\\\\d+)?(#[^@#$]+)?(\\\\$[a-zA-Z]+)?\")) {\n    throw new IllegalArgumentException(\"Table name does not follow table[@version][#branch][$type]: \" + name);\n}\nIcebergTableName.from(name);","typeGuard":"boolean isValidIcebergTableName(String name) {\n    return name != null && !name.isBlank() &&\n        name.chars().filter(c -> c == '@').count() <= 1 &&\n        name.chars().filter(c -> c == '#').count() <= 1 &&\n        name.chars().filter(c -> c == '$').count() <= 1;\n}","tryCatchPattern":"try {\n    IcebergTableName n = IcebergTableName.from(name);\n} catch (PrestoException e) {\n    if (e.getErrorCode() == NOT_SUPPORTED.toErrorCode()) {\n        log.warn(\"Unparseable Iceberg table name: %s\", name);\n    } else { throw e; }\n}","preventionTips":["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"],"tags":["iceberg","table-naming","not-supported","parse-error"],"backgroundTag":"invalid-identifier-name","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"}