Revanth14 commented on code in PR #1324:
URL: https://github.com/apache/iceberg-go/pull/1324#discussion_r3496590776


##########
catalog/rest/scan_planning.go:
##########
@@ -54,21 +59,24 @@ var ErrPlanExpired = fmt.Errorf("%w: scan plan expired", 
ErrRESTError)
 // SupportsPlanTableScan reports whether the server advertised the synchronous
 // plan endpoint.
 func (r *Catalog) SupportsPlanTableScan() bool {
-       return false
+       return r.endpoints.contains(endpointPlanTableScan)
 }
 
 // SupportsFullRemoteScanPlanning reports whether the server advertised all 
four
 // scan-planning endpoints (plan, fetch-result, cancel, fetch-tasks).
 func (r *Catalog) SupportsFullRemoteScanPlanning() bool {
-       return false
+       return r.SupportsPlanTableScan() &&
+               r.endpoints.contains(endpointFetchPlanResult) &&
+               r.endpoints.contains(endpointCancelPlanning) &&
+               r.endpoints.contains(endpointFetchScanTasks)
 }
 
 // --- table.ScanPlanner implementation ---------------------------------------
 
 // SupportsRemoteScanPlanning reports whether this catalog can complete a 
remote
 // plan end-to-end; backed by the split capability checks above.
 func (r *Catalog) SupportsRemoteScanPlanning() bool {
-       return false
+       return r.SupportsFullRemoteScanPlanning()

Review Comment:
   I kept `SupportsRemoteScanPlanning` as the end-to-end/full-endpoint 
predicate.
   
   The reason is that this method is consumed by `table.Scan` auto mode as the 
gate for whether to route the scan to remote planning. Once auto mode chooses 
remote, it does not get a second chance to fall back to local if the server 
returns `submitted` or plan-task fanout and the follow-up endpoints are missing.
   
   So `SupportsPlanTableScan()` remains the narrow “plan endpoint exists / 
sync-inline may work” check, while `SupportsRemoteScanPlanning()` keeps the 
table-side contract of “can complete remote planning end to end.” That avoids 
making auto mode fail on plan-only catalogs that could otherwise plan locally.
   
   For the Java-style “can the server plan at all” signal, 
`SupportsPlanTableScan()` is the exposed predicate; auto mode intentionally 
routes on the stricter end-to-end check.



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

Reply via email to