singhpk234 commented on code in PR #14867:
URL: https://github.com/apache/iceberg/pull/14867#discussion_r2850956800


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -595,9 +587,38 @@ private Supplier<BaseTable> createTableSupplier(
   }
 
   private RESTTable restTableForScanPlanning(
-      TableOperations ops, TableIdentifier finalIdentifier, RESTClient 
restClient) {
-    // server supports remote planning endpoint and server / client wants to 
do server side planning
-    if (endpoints.contains(Endpoint.V1_SUBMIT_TABLE_SCAN_PLAN) && 
restScanPlanningEnabled) {
+      TableOperations ops,
+      TableIdentifier finalIdentifier,
+      RESTClient restClient,
+      Map<String, String> tableConf) {
+    // Get client-side and server-side scan planning modes
+    String clientModeConfig = 
properties().get(RESTCatalogProperties.SCAN_PLANNING_MODE);
+    String serverModeConfig = 
tableConf.get(RESTCatalogProperties.SCAN_PLANNING_MODE);
+
+    // Validate that client and server configs don't conflict

Review Comment:
   > don’t really understand the motivation for having a client‑side 
configuration for scan planning
   
   I believe this is stemming from the config section of the loadTable response 
in general, even though we specify some catalog level config it gets over-riden 
based on server response (its implicit) for example the file IO creds send in 
the config as well as things like `client.region` get overriden 
https://github.com/apache/iceberg/blob/9534c9b3adc29d127ecc541ce131f49fd72f1980/open-api/rest-catalog-open-api.yaml#L3468
   
   The client side config is mostly from POV can a client specify its choice on 
if they wanna do server side planning or not.
   
   > If the client specifies a different value than the server, we simply fail 
(do we need a config just for failing?)
   
   yes that what i have for now, if they are two different stuff then fail 
because we don't know want server to just override the client, and client can't 
disobey server MUST. this will act a fence in which client doesn't wanna do 
server side planning and server can't force it. I mostly looking for handling 
this case,  thoughts ?



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