{"record":{"id":"78b89fa771b7cc68","repo":"apache/iceberg","slug":"procedure-ident-not-found-78b89f","errorCode":null,"errorMessage":"Procedure \" + ident + \" not found","messagePattern":"Procedure \" \\+ ident \\+ \" not found","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/BaseCatalog.java","lineNumber":62,"sourceCode":"  private static final boolean USE_NULLABLE_QUERY_SCHEMA_CTAS_RTAS_DEFAULT = true;\n\n  private boolean useNullableQuerySchema = USE_NULLABLE_QUERY_SCHEMA_CTAS_RTAS_DEFAULT;\n\n  @Override\n  public UnboundProcedure loadProcedure(Identifier ident) {\n    String[] namespace = ident.namespace();\n    String name = ident.name();\n\n    // namespace resolution is case insensitive until we have a way to configure case sensitivity in\n    // catalogs\n    if (isSystemNamespace(namespace)) {\n      ProcedureBuilder builder = SparkProcedures.newBuilder(name);\n      if (builder != null) {\n        return builder.withTableCatalog(this).build();\n      }\n    }\n\n    throw new RuntimeException(\"Procedure \" + ident + \" not found\");\n  }\n\n  @Override\n  public Identifier[] listProcedures(String[] namespace) {\n    if (isSystemNamespace(namespace)) {\n      return SparkProcedures.names().stream()\n          .map(name -> Identifier.of(namespace, name))\n          .toArray(Identifier[]::new);\n    } else {\n      return new Identifier[0];\n    }\n  }\n\n  @Override\n  public boolean isFunctionNamespace(String[] namespace) {\n    // Allow for empty namespace, as Spark's storage partitioned joins look up\n    // the corresponding functions to generate transforms for partitioning\n    // with an empty namespace, such as `bucket`.","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/BaseCatalog.java#L44-L80","documentation":"BaseCatalog.loadProcedure looks up a procedure by name via SparkProcedures; if the namespace is valid but no procedure builder is registered for the identifier, it throws RuntimeException 'Procedure <ident> not found'.","triggerScenarios":"CALL catalog.system.some_procedure(...) where the procedure name is misspelled or does not exist in this Iceberg version.","commonSituations":"Typos in CALL statements; using a procedure added in a newer Iceberg release than the runtime jar; calling a procedure not registered for the catalog.","solutions":["Check spelling of the procedure name","List available procedures via SparkProcedures.names() or docs and use an existing name","Upgrade the Iceberg Spark runtime if the procedure exists only in newer versions","Confirm you are calling through the right catalog (catalog.system.<proc>)"],"exampleFix":"// before\nCALL catalog.system.rewritte_data_files(...)\n// after\nCALL catalog.system.rewrite_data_files(...)","handlingStrategy":"validation","validationCode":"Set<String> known = SparkProcedures.names();\nif (!known.contains(procName)) {\n  throw new IllegalArgumentException(\"Unknown procedure: \" + procName + \"; available: \" + known);\n}","typeGuard":null,"tryCatchPattern":"try {\n  spark.sql(\"CALL \" + ident);\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"not found\")) {\n    log.error(\"Procedure not found; check spelling and Iceberg version\");\n  } else throw e;\n}","preventionTips":["Verify procedure names against the docs for your Iceberg version","Keep the runtime upgraded if you rely on newer procedures"],"tags":["spark","procedure","not-found"],"backgroundTag":"entity-not-found","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}