{"record":{"id":"9a80b16dbbb1dd67","repo":"prestodb/presto","slug":"local-file-no-files","errorCode":"LOCAL_FILE_NO_FILES","errorMessage":"No matching files found in directory: \" + location","messagePattern":"No matching files found in directory: \" \\+ location","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-local-file/src/main/java/com/facebook/presto/localfile/DataLocation.java","lineNumber":93,"sourceCode":"\n    public List<File> files()\n    {\n        checkState(location.exists(), \"location %s doesn't exist\", location);\n        if (!pattern.isPresent()) {\n            return ImmutableList.of(location);\n        }\n\n        checkState(location.isDirectory(), \"location %s is not a directory\", location);\n\n        try (DirectoryStream<Path> paths = newDirectoryStream(location.toPath(), pattern.get())) {\n            ImmutableList.Builder<File> builder = ImmutableList.builder();\n            for (Path path : paths) {\n                builder.add(path.toFile());\n            }\n            List<File> files = builder.build();\n\n            if (files.isEmpty()) {\n                throw new PrestoException(LOCAL_FILE_NO_FILES, \"No matching files found in directory: \" + location);\n            }\n            return files.stream()\n                    .sorted((o1, o2) -> Long.compare(o2.lastModified(), o1.lastModified()))\n                    .collect(Collectors.toList());\n        }\n        catch (IOException e) {\n            throw new PrestoException(LOCAL_FILE_FILESYSTEM_ERROR, \"Error listing files in directory: \" + location, e);\n        }\n    }\n}\n","sourceCodeStart":75,"sourceCodeEnd":104,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-local-file/src/main/java/com/facebook/presto/localfile/DataLocation.java#L75-L104","documentation":"DataLocation.files() found no files matching the configured glob pattern in the directory for a local-file catalog table. The location exists and is a directory, but the pattern matched nothing, so there is no data to read.","triggerScenarios":"Thrown at presto-local-file/src/main/java/com/facebook/presto/localfile/DataLocation.java:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify files exist in the directory and their names match the table's filename pattern property","Fix the table definition's location/pattern in the local-file connector config"],"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"}