jerryshao commented on code in PR #11060:
URL: https://github.com/apache/gravitino/pull/11060#discussion_r3271726706
##########
lance/lance-common/src/main/java/org/apache/gravitino/lance/common/utils/LancePropertiesUtils.java:
##########
@@ -68,4 +68,14 @@ public static Map<String, String> resolveLanceStorageOptions(
effectiveStorageOptions.putAll(getLanceStorageOptions(tableProperties));
return effectiveStorageOptions;
}
+
+ public static Map<String, String> toTableProperties(Map<String, String>
storageOptions) {
+ if (storageOptions == null) {
+ return Map.of();
+ }
+
+ return storageOptions.entrySet().stream()
+ .collect(
+ Collectors.toMap(e -> LANCE_STORAGE_OPTIONS_PREFIX + e.getKey(),
Map.Entry::getValue));
+ }
Review Comment:
We can simplify as: `storageOptions == null ? Collections.emptyMap() : ...`
--
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]