FANNG1 commented on code in PR #6824:
URL: https://github.com/apache/gravitino/pull/6824#discussion_r2055120253
##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/jdbc/JdbcPropertiesConverter.java:
##########
@@ -63,7 +76,16 @@ public Map<String, String>
toSparkCatalogProperties(Map<String, String> properti
@Override
public Map<String, String> toGravitinoTableProperties(Map<String, String>
properties) {
- return new HashMap<>(properties);
+ if (!supportsTableProperties) {
+ for (String key : properties.keySet()) {
+ if (!"owner".equalsIgnoreCase(key)) {
+ throw new UnsupportedOperationException("Doesn't support table
property " + key);
+ }
+ }
+ return new HashMap<>();
Review Comment:
Collections.emptyMap is preferred because it doesn't create an new map every
time, but this is not an blocking issue, let's go ahead
##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/jdbc/JdbcPropertiesConverter.java:
##########
@@ -63,7 +76,16 @@ public Map<String, String>
toSparkCatalogProperties(Map<String, String> properti
@Override
public Map<String, String> toGravitinoTableProperties(Map<String, String>
properties) {
- return new HashMap<>(properties);
+ if (!supportsTableProperties) {
+ for (String key : properties.keySet()) {
+ if (!"owner".equalsIgnoreCase(key)) {
+ throw new UnsupportedOperationException("Doesn't support table
property " + key);
+ }
+ }
+ return new HashMap<>();
Review Comment:
`Collections.emptyMap` is preferred because it doesn't create an new map
every time, but this is not an blocking issue, let's go ahead
--
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]