amogh-jahagirdar commented on code in PR #13400:
URL: https://github.com/apache/iceberg/pull/13400#discussion_r2476472979
##########
core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java:
##########
@@ -434,6 +469,169 @@ public <T extends RESTResponse> T handleRequest(
return castResponse(responseType, response);
}
+ case PLAN_TABLE_SCAN:
+ {
+ TableIdentifier ident = tableIdentFromPathVars(vars);
+ PlanTableScanRequest request =
castRequest(PlanTableScanRequest.class, body);
+ Table table = catalog.loadTable(ident);
+ TableScan tableScan = table.newScan();
+
+ if (request.snapshotId() != null) {
+ tableScan.useSnapshot(request.snapshotId());
+ }
+ if (request.select() != null) {
+ tableScan.select(request.select());
+ }
+ if (request.filter() != null) {
+ tableScan.filter(request.filter());
+ }
+ if (request.statsFields() != null) {
+ tableScan.includeColumnStats(request.statsFields());
+ }
+ tableScan.caseSensitive(request.caseSensitive());
+
+ List<FileScanTask> fileScanTasks = Lists.newArrayList();
+ CloseableIterable<FileScanTask> returnedTasks =
tableScan.planFiles();
+ returnedTasks.forEach(task -> fileScanTasks.add(task));
+
+ if (ident.equals(TABLE_COMPLETED_WITH_FILE_SCAN_TASK)) {
Review Comment:
@singhpk234 I published a PR to your branch on how we may want to do this
https://github.com/singhpk234/iceberg/pull/271 , comments in the code. Let me
know if this makes sense, we can probably publish it separately
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]