wombatu-kun commented on code in PR #16154:
URL: https://github.com/apache/iceberg/pull/16154#discussion_r3360312152


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkConfParser.java:
##########
@@ -278,6 +281,20 @@ protected T parse(Function<String, T> conversion, T 
defaultValue) {
       }
 
       if (sessionConfName != null) {
+        if (tableName != null) {
+          String tableSessionConfName = sessionConfName + "." + tableName;
+          String tableSessionConfValue = sessionConf.get(tableSessionConfName, 
null);
+          if (tableSessionConfValue != null) {
+            return conversion.apply(tableSessionConfValue);
+          }
+
+          String sparkTableSessionConfValue =
+              sessionConf.get(toCamelCase(tableSessionConfName), null);

Review Comment:
   `toCamelCase` is applied to the full composed key including the 
`table.name()` suffix, so any hyphen in the catalog/database/table name (legal 
via backticks) gets folded into camelCase and this fallback can never match the 
key a user would set. The primary kebab lookup at line 286 uses the raw name 
and is fine. If the camelCase variant is only meant to cover the conf-name 
part, camel-case just that: `sessionConf.get(toCamelCase(sessionConfName) + "." 
+ tableName, null)`.



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