danny0405 commented on a change in pull request #11791:
URL: https://github.com/apache/flink/pull/11791#discussion_r414305379



##########
File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -1403,4 +1446,29 @@ public CatalogColumnStatistics 
getPartitionColumnStatistics(ObjectPath tablePath
                }
        }
 
+       private static boolean createObjectIsGeneric(Map<String, String> 
properties) {
+               // When creating an object, a hive object needs explicitly have 
a key is_generic = false
+               // otherwise, this is a generic object if 1) the key is missing 
2) is_generic = true
+               // this is opposite to reading an object. See 
getObjectIsGeneric().
+               if (properties == null) {
+                       return true;
+               }
+               boolean isGeneric;
+               if (!properties.containsKey(CatalogConfig.IS_GENERIC)) {
+                       // must be a generic object
+                       isGeneric = true;
+                       properties.put(CatalogConfig.IS_GENERIC, 
String.valueOf(true));
+               } else {
+                       isGeneric = 
Boolean.parseBoolean(properties.get(CatalogConfig.IS_GENERIC));
+               }
+               return isGeneric;
+       }
+
+       private static boolean getObjectIsGeneric(Map<String, String> 
properties) {
+               // When retrieving an object, a generic object needs explicitly 
have a key is_generic = true

Review comment:
       How about name it `getObjectIsGenericDefaultFalse`




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to