{"record":{"id":"3f74edaf60f52505","repo":"prestodb/presto","slug":"invalid-procedure-argument","errorCode":"INVALID_PROCEDURE_ARGUMENT","errorMessage":"Directory path can not be a empty string","messagePattern":"Directory path can not be a empty string","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/CachingDirectoryLister.java","lineNumber":154,"sourceCode":"            {\n                HiveFileInfo next = iterator.next();\n                files.add(next);\n                return next;\n            }\n        };\n    }\n\n    public boolean isPathCached(Path path)\n    {\n        ValueHolder value = Optional.ofNullable(cache.getIfPresent(path.toString())).orElse(null);\n        return value != null;\n    }\n\n    public void invalidateDirectoryListCache(Optional<String> directoryPath)\n    {\n        if (directoryPath.isPresent()) {\n            if (directoryPath.get().isEmpty()) {\n                throw new PrestoException(INVALID_PROCEDURE_ARGUMENT, \"Directory path can not be a empty string\");\n            }\n\n            ValueHolder value = cache.getIfPresent(directoryPath.get());\n            if (value == null) {\n                throw new PrestoException(INVALID_PROCEDURE_ARGUMENT, \"Given directory path is not cached : \" + directoryPath);\n            }\n            cache.invalidate(directoryPath.get());\n        }\n        else {\n            flushCache();\n        }\n    }\n\n    @Managed\n    public void flushCache()\n    {\n        cache.invalidateAll();\n    }","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/CachingDirectoryLister.java#L136-L172","documentation":"Procedure-argument validation: the invalidate-directory-list-cache procedure was invoked with a non-empty-string check passing but an empty directory path (the Optional held \"\"), which names no directory.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/CachingDirectoryLister.java:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the actual directory path to the procedure","Omit the argument if the whole cache should be invalidated"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}