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, (but it seems like its kind of conflicts with
the existing behaviour where server just override the client configs) if they
are two different stuff then fail because we don't know want the server to just
override the client, and client can't disobey server `MUST`. this will act as a
fence in which client doesn't wanna do server side planning and server can't
force it (may be scan planning perf is suboptimal / cost of this endpoint is
high). I mostly looking for handling this case. would really appreciate your
thoughts on this case ?
I agree like in nothing specified by the server case, client wins in
any-case, thats true even today not sure if we wanna spec it out thought.
--
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]