deniskuzZ commented on code in PR #4088:
URL: https://github.com/apache/hive/pull/4088#discussion_r1124900883
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java:
##########
@@ -243,10 +241,18 @@ static Optional<Catalog> loadCatalog(Configuration conf,
String catalogName) {
* @return complete map of catalog properties
*/
private static Map<String, String> getCatalogProperties(Configuration conf,
String catalogName, String catalogType) {
- String keyPrefix = InputFormatConfig.CATALOG_CONFIG_PREFIX + catalogName;
- Map<String, String> catalogProperties = Streams.stream(conf.iterator())
- .filter(e -> e.getKey().startsWith(keyPrefix))
- .collect(Collectors.toMap(e ->
e.getKey().substring(keyPrefix.length() + 1), Map.Entry::getValue));
+ Map<String, String> catalogProperties = Maps.newHashMap();
+ conf.forEach(config -> {
+ if
(config.getKey().startsWith(InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX)) {
+ catalogProperties.putIfAbsent(
+
config.getKey().substring(InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX.length()),
config.getValue());
Review Comment:
formatting is not consistent, in this `if` branch `config.getValue()` is on
the same line with key, in the next `if` branch it's on a new line
--
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]