mchades commented on code in PR #7215:
URL: https://github.com/apache/gravitino/pull/7215#discussion_r2121439391
##########
catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopCatalogIT.java:
##########
@@ -656,6 +718,177 @@ public void testListFilesets() throws IOException {
Assertions.assertEquals(fileset2.name(), nameIdentifiers1[1].name());
}
+ @Test
+ public void testListFilesetFiles() throws IOException {
+ dropSchema();
+ createSchema();
+
+ String filesetName = "test_list_files";
+ String storageLocation = storageLocation(filesetName);
+ createFileset(filesetName, "comment", MANAGED, storageLocation,
ImmutableMap.of("k1", "v1"));
+ assertFilesetExists(filesetName);
+
+ Path basePath = new Path(storageLocation);
+ fileSystem.mkdirs(basePath);
+
+ String fileName = "test.txt";
+ Path filePath = new Path(basePath, fileName);
+ String content = "hello";
+ try (FSDataOutputStream out = fileSystem.create(filePath, true)) {
+ out.write(content.getBytes(StandardCharsets.UTF_8));
+ }
+
+ NameIdentifier filesetIdent = NameIdentifier.of(schemaName, filesetName);
+ String actualJson = getFileInfos(filesetIdent, null, null);
Review Comment:
I saw here is a redundant field (`dir`) in the response, could you plz fix
it:
```json
{
"code": 0,
"files": [
{
"dir": false,
"name": "test.txt",
"isDir": false,
"size": 5,
"lastModified": 1748875070123,
"path":
"/fileset/CatalogFilesetIT_catalog_4c5eb46f/CatalogFilesetIT_schema_d9f73cd7/test_list_files_with_subpath/subdir"
}
]
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]