ZihanLi58 commented on code in PR #3632:
URL: https://github.com/apache/gobblin/pull/3632#discussion_r1100717050


##########
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreUtils.java:
##########
@@ -256,6 +255,23 @@ public static SerDeInfo getSerDeInfo(HiveRegistrationUnit 
unit) {
     return si;
   }
 
+  /**
+   * Util for detecting if a table has a complex union (aka non-optional 
unions) column types.
+   *
+   * @param t
+   * @return if hive table contains complex uniontype columns
+   */
+  public static boolean containsUnionTypeColumn(HiveTable t) {
+    return t.getColumns().stream()
+        .map(HiveRegistrationUnit.Column::getType)
+        .map(Object::toString)
+        .anyMatch(columnType -> columnType.contains("uniontype"));

Review Comment:
   Seems to me we only check union type but not non-optional union type. Is 
this intentional? If so, please update the description to reflect that as well.



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

Reply via email to