sunxiaojian commented on code in PR #9050:
URL: https://github.com/apache/gravitino/pull/9050#discussion_r2563507949


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/rest/IcebergTableOperations.java:
##########
@@ -375,6 +377,78 @@ public Response getTableCredentials(
     }
   }
 
+  /**
+   * Plan table scan endpoint.
+   *
+   * <p>POST /v1/{prefix}/namespaces/{namespace}/tables/{table}/scan
+   *
+   * <p>This endpoint allows clients to request a scan plan from the server, 
which can optimize scan
+   * planning by leveraging server-side resources and reduce network overhead.
+   *
+   * <p>Implementation referenced from:
+   *
+   * <ul>
+   *   <li>Iceberg PR #13004 - Request/Response models for REST Scan Planning
+   *   <li>Iceberg PR #13400 - Core REST Scan Planning Task Implementation
+   * </ul>
+   *
+   * <p>Now using official {@code PlanTableScanRequest} and {@code 
PlanTableScanResponse} from
+   * Apache Iceberg 1.10.0+.
+   *
+   * <p>Note: Iceberg 1.10.0 is a transition version. Full Builder API for 
PlanTableScanRequest will
+   * be available in Iceberg 1.11.0+. See:
+   * 
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/requests/PlanTableScanRequest.java
+   *
+   * @param prefix The catalog prefix
+   * @param namespace The namespace
+   * @param table The table name
+   * @param accessDelegation The access delegation header for credential 
vending
+   * @param scanRequest The scan request containing filters, projections, etc.
+   * @return Response containing the scan plan with tasks
+   */
+  @POST
+  @Path("{table}/scan")
+  @Produces(MediaType.APPLICATION_JSON)
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Timed(name = "plan-table-scan." + MetricNames.HTTP_PROCESS_DURATION, 
absolute = true)
+  @ResponseMetered(name = "plan-table-scan", absolute = true)
+  public Response planTableScan(
+      @PathParam("prefix") String prefix,
+      @Encoded() @PathParam("namespace") String namespace,
+      @PathParam("table") String table,
+      @HeaderParam(X_ICEBERG_ACCESS_DELEGATION) String accessDelegation,

Review Comment:
   removed



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