jerqi commented on code in PR #8711:
URL: https://github.com/apache/gravitino/pull/8711#discussion_r2387052376


##########
docs/open-api/statistics.yaml:
##########
@@ -379,6 +390,74 @@ components:
               additionalProperties: {}
               description: The statistics to update for the partition
 
+    PartitionRange:
+        type: object
+        properties:
+            lowerPartitionName:
+              type: string
+              description: The lower partition name
+            upperPartitionName:
+              type: string
+              description: The upper partition name
+            lowerBoundType:
+              type: string
+              description: lower bound type
+              enum:
+                - "CLOSED"
+                - "OPEN"
+            upperBoundType:
+              type: string
+              description: upper bound type
+              enum:
+                - "CLOSED"
+                - "OPEN"
+
+    PartitionStatistics:
+        type: object
+        required:
+            - partitionName
+            - statistics
+        properties:
+            partitionName:
+              type: string
+              description: The name of the partition
+            statistics:
+              type: array
+              items:
+                $ref: "#/components/schemas/Statistic"
+
+    Statistic:
+        type: object

Review Comment:
   Fixed.



##########
docs/open-api/statistics.yaml:
##########
@@ -452,28 +530,137 @@ components:
     StatisticListResponse:
         value: {
             "code": 0,
-            "statistics": {
-                "row_count": "1000",
-                "file_size": "500MB"
-            }
+            "statistics": [
+                {
+                  "name": "row_count",
+                  "value": "1000",
+                  "reserved": true,
+                  "modifiable": false,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
+                },
+                {
+                  "name": "file_size",
+                  "value": "500MB",
+                  "reserved": true,
+                  "modifiable": false,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
+                },
+                {
+                  "name": "custom-k1",
+                  "value": "v1",
+                  "reserved": false,
+                  "modifiable": true,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
+                }]
         }
 
 
     PartitionStatisticListResponse:
         value: {
-            "code": 0,
-            "partitionStatistics": {
-                "2023-10-01": {
-                    "row_count": "500",
-                    "file_size": "250MB"
+          "code": 0,
+          "partitionStatistics": [
+            {
+              "partitionName": "p0",
+              "statistics": [
+                {
+                  "name": "row_count",
+                  "value": "1000",
+                  "reserved": true,
+                  "modifiable": false,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
+                },
+                {
+                  "name": "file_size",
+                  "value": "500MB",
+                  "reserved": true,
+                  "modifiable": false,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
                 },
-                "2023-10-02": {
-                    "row_count": "600",
-                    "file_size": "300MB"
+                {
+                  "name": "custom-k1",
+                  "value": "v1",
+                  "reserved": false,
+                  "modifiable": true,
+                  "audit": {
+                    "creator": "user1",
+                    "createTime": "2023-10-01T12:00:00Z",
+                    "lastModifier": "user2",
+                    "lastModifiedTime": "2023-10-02T12:00:00Z"
+                  }
                 }
+              ]
+            },
+            {
+              "partitionName": "p1",
+              "statistics": [
+               {
+                 "name": "row_count",
+                 "value": "2000",
+                 "reserved": true,
+                 "modifiable": false,
+                 "audit": {
+                   "creator": "user1",
+                   "createTime": "2023-10-01T12:00:00Z",
+                   "lastModifier": "user2",
+                   "lastModifiedTime": "2023-10-02T12:00:00Z"
+                 }
+               },
+               {
+                 "name": "file_size",
+                 "value": "1GB",
+                 "reserved": true,
+                 "modifiable": false,
+                 "audit": {
+                   "creator": "user1",
+                   "createTime": "2023-10-01T12:00:00Z",
+                   "lastModifier": "user2",
+                   "lastModifiedTime": "2023-10-02T12:00:00Z"
+                 }
+               },
+               {
+                 "name": "custom-k1",
+                 "value": "v2",
+                 "reserved": false,
+                 "modifiable": true,
+                 "audit": {
+                   "creator": "user1",
+                   "createTime": "2023-10-01T12:00:00Z",
+                   "lastModifier": "user2",
+                   "lastModifiedTime": "2023-10-02T12:00:00Z"
+                 }
+               }
+              ]
             }
+          ]
         }
 
+

Review Comment:
   Fixed.



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