SteNicholas commented on code in PR #54:
URL: 
https://github.com/apache/incubator-paimon-webui/pull/54#discussion_r1360664263


##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/constant/MetadataConstant.java:
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.constant;
+
+/** metadata constant. */

Review Comment:
   ```suggestion
   /** Metadata constant. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/controller/MetadataController.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.controller;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.result.R;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+import org.apache.paimon.web.server.service.MetadataService;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/** metadata api controller. */
+@Slf4j
+@RestController
+@RequestMapping("/api/metadata")
+public class MetadataController {
+
+    private final MetadataService metadataService;
+
+    public MetadataController(MetadataService metadataService) {
+        this.metadataService = metadataService;
+    }
+
+    @PostMapping("/querySchemaInfo")

Review Comment:
   ```suggestion
       @PostMapping("/query/schema")
   ```
   BTW, why use `PostMapping`? It's better to use `GetMapping` for query 
request.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/controller/MetadataController.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.controller;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.result.R;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+import org.apache.paimon.web.server.service.MetadataService;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/** metadata api controller. */
+@Slf4j
+@RestController
+@RequestMapping("/api/metadata")
+public class MetadataController {
+
+    private final MetadataService metadataService;
+
+    public MetadataController(MetadataService metadataService) {
+        this.metadataService = metadataService;
+    }
+
+    @PostMapping("/querySchemaInfo")
+    public R<List<SchemaInfoVo>> getSchemaInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getSchemaInfo(dto));
+    }
+
+    @PostMapping("/querySnapshotInfo")

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/controller/MetadataController.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.controller;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.result.R;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+import org.apache.paimon.web.server.service.MetadataService;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/** metadata api controller. */
+@Slf4j
+@RestController
+@RequestMapping("/api/metadata")
+public class MetadataController {
+
+    private final MetadataService metadataService;
+
+    public MetadataController(MetadataService metadataService) {
+        this.metadataService = metadataService;
+    }
+
+    @PostMapping("/querySchemaInfo")
+    public R<List<SchemaInfoVo>> getSchemaInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getSchemaInfo(dto));
+    }
+
+    @PostMapping("/querySnapshotInfo")
+    public R<List<SnapshotInfoVo>> getSnapshotInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getSnapshotInfo(dto));
+    }
+
+    @PostMapping("/queryManifestInfo")

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/dto/QueryMetadataInfoDto.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.dto;
+
+import lombok.Data;
+
+/** use for get table metadata. */
+@Data
+public class QueryMetadataInfoDto {

Review Comment:
   ```suggestion
   public class QueryMetadataDTO {
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/DataFileInfoVo.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+/** metadata data file return value. */
+public class DataFileInfoVo {

Review Comment:
   ```suggestion
   public class DataFileVO {
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/dto/QueryMetadataInfoDto.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.dto;
+
+import lombok.Data;
+
+/** use for get table metadata. */

Review Comment:
   ```suggestion
   /** DTO of query metadata is used for getting table metadata. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/ManifestsInfoVo.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+/** metadata manifest return value. */

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/DataFileInfoVo.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+/** metadata data file return value. */
+public class DataFileInfoVo {
+
+    private final String partition;
+    private final Long bucket;

Review Comment:
   ```suggestion
       private final long bucket;
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/SnapshotInfoVo.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+import java.time.LocalDateTime;
+
+/** metadata snapshot return value. */

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/MetadataService.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.service;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+
+import java.util.List;
+
+/** metadata service. */

Review Comment:
   ```suggestion
   /** Metadata service includes the service interfaces of metadata. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/MetadataService.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.service;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+
+import java.util.List;
+
+/** metadata service. */
+public interface MetadataService {
+
+    /**
+     * Retrieve a list of Metadata schema info.

Review Comment:
   ```suggestion
        * Retrieves a list of Metadata schema.
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/controller/MetadataController.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.controller;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.result.R;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+import org.apache.paimon.web.server.service.MetadataService;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/** metadata api controller. */
+@Slf4j
+@RestController
+@RequestMapping("/api/metadata")
+public class MetadataController {
+
+    private final MetadataService metadataService;
+
+    public MetadataController(MetadataService metadataService) {
+        this.metadataService = metadataService;
+    }
+
+    @PostMapping("/querySchemaInfo")
+    public R<List<SchemaInfoVo>> getSchemaInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getSchemaInfo(dto));
+    }
+
+    @PostMapping("/querySnapshotInfo")
+    public R<List<SnapshotInfoVo>> getSnapshotInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getSnapshotInfo(dto));
+    }
+
+    @PostMapping("/queryManifestInfo")
+    public R<List<ManifestsInfoVo>> getManifestInfo(@RequestBody 
QueryMetadataInfoDto dto) {
+        return R.succeed(metadataService.getManifestInfo(dto));
+    }
+
+    @PostMapping("/queryDataFileInfo")

Review Comment:
   Ditto.



##########
paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/MetadataControllerTest.java:
##########
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.controller;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.model.TableColumn;
+import org.apache.paimon.web.server.data.model.TableInfo;
+import org.apache.paimon.web.server.data.result.R;
+import org.apache.paimon.web.server.util.ObjectMapperUtils;
+import org.apache.paimon.web.server.util.PaimonDataType;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.junit.jupiter.api.Test;
+import 
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.MediaType;
+import org.springframework.test.context.event.annotation.AfterTestClass;
+import org.springframework.test.context.event.annotation.BeforeTestClass;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.result.MockMvcResultHandlers;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/** test for MetadataController. */

Review Comment:
   ```suggestion
   /** Tests for {@link MetadataController}. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/model/MetadataFieldsModel.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.model;
+
+import lombok.Data;
+
+/** table metadata fields model. */

Review Comment:
   ```suggestion
   /** Model of metadata fields. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/DataFileInfoVo.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+/** metadata data file return value. */

Review Comment:
   ```suggestion
   /** VO of metadata data file. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/model/MetadataOptionModel.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/** table metadata options model. */

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/DataFileInfoVo.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+/** metadata data file return value. */
+public class DataFileInfoVo {
+
+    private final String partition;
+    private final Long bucket;
+    private final String filePath;
+    private final String fileFormat;
+
+    public DataFileInfoVo(String partition, Long bucket, String filePath, 
String fileFormat) {
+        this.partition = partition;
+        this.bucket = bucket;
+        this.filePath = filePath;
+        this.fileFormat = fileFormat;
+    }
+
+    public String getPartition() {
+        return partition;
+    }
+
+    public Long getBucket() {
+        return bucket;
+    }
+
+    public String getFilePath() {
+        return filePath;
+    }
+
+    public String getFileFormat() {
+        return fileFormat;
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    /** DataFileInfoVo Builder. */
+    public static class Builder {
+        private String partition;
+        private Long bucket;
+        private String filePath;
+        private String fileFormat;
+
+        public Builder setPartition(String partition) {
+            this.partition = partition;
+            return this;
+        }
+
+        public Builder setBucket(Long bucket) {
+            this.bucket = bucket;
+            return this;
+        }
+
+        public Builder setFilePath(String filePath) {
+            this.filePath = filePath;
+            return this;
+        }
+
+        public Builder setFileFormat(String fileFormat) {
+            this.fileFormat = fileFormat;
+            return this;
+        }
+
+        public DataFileInfoVo builder() {

Review Comment:
   You could introduce `builder` in `DataFileVO` and update this method to 
`build()`.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/SchemaInfoVo.java:
##########
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.data.vo;
+
+import org.apache.paimon.web.server.data.model.MetadataFieldsModel;
+import org.apache.paimon.web.server.data.model.MetadataOptionModel;
+
+import javax.annotation.Nullable;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/** vo for getSchemaInfo. */

Review Comment:
   Ditto.



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/impl/MetadataServiceImpl.java:
##########
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.service.impl;
+
+import org.apache.paimon.catalog.Catalog;
+import org.apache.paimon.data.InternalRow;
+import org.apache.paimon.reader.RecordReader;
+import org.apache.paimon.table.Table;
+import org.apache.paimon.table.source.ReadBuilder;
+import org.apache.paimon.web.api.table.TableManager;
+import org.apache.paimon.web.server.constant.MetadataConstant;
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.model.CatalogInfo;
+import org.apache.paimon.web.server.data.model.MetadataFieldsModel;
+import org.apache.paimon.web.server.data.model.MetadataOptionModel;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+import org.apache.paimon.web.server.service.CatalogService;
+import org.apache.paimon.web.server.service.MetadataService;
+import org.apache.paimon.web.server.util.PaimonServiceUtils;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/** metadata service impl. */

Review Comment:
   ```suggestion
   /** The implementation of {@link MetadataService}. */
   ```



##########
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/MetadataService.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.web.server.service;
+
+import org.apache.paimon.web.server.data.dto.QueryMetadataInfoDto;
+import org.apache.paimon.web.server.data.vo.DataFileInfoVo;
+import org.apache.paimon.web.server.data.vo.ManifestsInfoVo;
+import org.apache.paimon.web.server.data.vo.SchemaInfoVo;
+import org.apache.paimon.web.server.data.vo.SnapshotInfoVo;
+
+import java.util.List;
+
+/** metadata service. */
+public interface MetadataService {
+
+    /**
+     * Retrieve a list of Metadata schema info.
+     *
+     * @param dto query metadata info
+     * @return a list of DatabaseInfo objects
+     */
+    List<SchemaInfoVo> getSchemaInfo(QueryMetadataInfoDto dto);

Review Comment:
   Remove the `info` from all interfaces of `MetadataService`.



-- 
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]


Reply via email to