kbendick commented on a change in pull request #3078:
URL: https://github.com/apache/iceberg/pull/3078#discussion_r712764367



##########
File path: core/src/main/java/org/apache/iceberg/util/PropertyUtil.java
##########
@@ -70,4 +71,16 @@ public static String propertyAsString(Map<String, String> 
properties,
     }
     return defaultValue;
   }
+
+  public static Properties filterAndRemovePrefix(Map<String, String> 
properties,

Review comment:
       Yeah that would be fine.
   
   In retrospect, I had envisioned it maybe being a bit different, e.g. 
returning `Map<String, String>` as we do filter some maps based on prefix key 
and then strip off the prefix (e.g. in `initialize` calls etc). For example, we 
do that with Spark quite often, both when `initialize`ing the Catalog as well 
as merging in the `spark.sql.catalog.$(catalogName).hadoop.*` fields.
   
   But you're right, it was totally my suggestion to have it return 
`Properties` and it's not that portable that way. I apologize for that extra 
work @dungdm93
   
   So I can agree that `JdbcUtil` would probably be just as good of a place for 
this. I'd be fine with moving to `JdbcUtil` or as a private method as 
mentioned. 👍 




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