[ 
https://issues.apache.org/jira/browse/GOBBLIN-1774?focusedWorklogId=844880&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844880
 ]

ASF GitHub Bot logged work on GOBBLIN-1774:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Feb/23 21:23
            Start Date: 10/Feb/23 21:23
    Worklog Time Spent: 10m 
      Work Description: homatthew commented on code in PR #3632:
URL: https://github.com/apache/gobblin/pull/3632#discussion_r1103260869


##########
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreUtils.java:
##########
@@ -256,6 +262,71 @@ public static SerDeInfo getSerDeInfo(HiveRegistrationUnit 
unit) {
     return si;
   }
 
+  public static boolean containsNonOptionalUnionTypeColumn(Table t) {
+    return containsNonOptionalUnionTypeColumn(getHiveTable(t));
+  }
+
+  /**
+   * Util for detecting if a hive table has a non-optional union (aka complex 
unions) column types. A non optional
+   * union is defined as a uniontype with n >= 2 non-null subtypes
+   *
+   * @param hiveTable Hive table
+   * @return if hive table contains non-optional uniontype columns
+   */
+  public static boolean containsNonOptionalUnionTypeColumn(HiveTable 
hiveTable) {
+    if (hiveTable.getProps().contains("avro.schema.literal")) {

Review Comment:
   Used HiveAvroSerDeManager. Same effect but this one is not deprecated and is 
Gobblin managed





Issue Time Tracking
-------------------

    Worklog Id:     (was: 844880)
    Time Spent: 2.5h  (was: 2h 20m)

> Add utility method for GMIP, MR compaction, and Incremental to skip override 
> hive schema on topics with complex union
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1774
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1774
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to