stevenzwu commented on code in PR #9695:
URL: https://github.com/apache/iceberg/pull/9695#discussion_r1490356134


##########
open-api/rest-catalog-open-api.py:
##########
@@ -209,6 +209,16 @@ class MetadataLog(BaseModel):
     __root__: List[MetadataLogItem]
 
 
+class PlanTask(BaseModel):
+    """
+    A flexible JSON object that contains information provided by the server, 
to be utilized by clients for distributed planning, should be supplied "as is" 
for input in PlanTable operation.

Review Comment:
   nit: remove "flexible". stick to plain fact.



##########
open-api/rest-catalog-open-api.py:
##########
@@ -905,6 +973,28 @@ class CreateTableRequest(BaseModel):
     properties: Optional[Dict[str, str]] = None
 
 
+class PlanContext(BaseModel):
+    select: List[str] = Field(..., description='A list of the selected 
columns')
+    project: Optional[List[str]] = Field(None, description='A list of the 
projections')
+    filter: Optional[Expression] = None
+    options: Dict[str, str]
+    snapshot_id: Optional[int] = Field(None, alias='snapshot-id')

Review Comment:
   nit: alias to `use-snapshot`?



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -532,6 +532,100 @@ paths:
         5XX:
           $ref: '#/components/responses/ServerErrorResponse'
 
+  /v1/{prefix}/namespaces/{namespace}/tables/{table}/preplan:
+    parameters:
+      - $ref: '#/components/parameters/prefix'
+      - $ref: '#/components/parameters/namespace'
+      - $ref: '#/components/parameters/table'
+    post:
+      tags:
+        - Catalog API
+      summary: Find plan-tasks based on a query.

Review Comment:
   this summary description would suggest that query should be part of the 
request body



##########
open-api/rest-catalog-open-api.py:
##########
@@ -905,6 +973,28 @@ class CreateTableRequest(BaseModel):
     properties: Optional[Dict[str, str]] = None
 
 
+class PlanContext(BaseModel):
+    select: List[str] = Field(..., description='A list of the selected 
columns')
+    project: Optional[List[str]] = Field(None, description='A list of the 
projections')
+    filter: Optional[Expression] = None
+    options: Dict[str, str]
+    snapshot_id: Optional[int] = Field(None, alias='snapshot-id')
+    from_snapshot_id: Optional[int] = Field(None, alias='from-snapshot-id')
+    to_snapshot_id: Optional[int] = Field(None, alias='to-snapshot-id')
+    timestamp_ms: Optional[int] = Field(None, alias='timestamp-ms')

Review Comment:
   alias `timestamp-ms` -> `as-of-time`?



##########
open-api/rest-catalog-open-api.py:
##########
@@ -905,6 +973,28 @@ class CreateTableRequest(BaseModel):
     properties: Optional[Dict[str, str]] = None
 
 
+class PlanContext(BaseModel):
+    select: List[str] = Field(..., description='A list of the selected 
columns')
+    project: Optional[List[str]] = Field(None, description='A list of the 
projections')
+    filter: Optional[Expression] = None
+    options: Dict[str, str]
+    snapshot_id: Optional[int] = Field(None, alias='snapshot-id')
+    from_snapshot_id: Optional[int] = Field(None, alias='from-snapshot-id')

Review Comment:
   in `IncrementalScan`, we have `fromSnapshot` API/semantics of `inclusive` or 
`exclusive`. do we need to replicate the same behavior here?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to