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


##########
gobblin-hive-registration/src/test/java/org/apache/gobblin/hive/metastore/HiveMetaStoreUtilsTest.java:
##########
@@ -212,4 +217,84 @@ public void testGetHiveTable() throws Exception {
     Assert.assertEquals(fieldA.getType(), "int");
 
   }
+
+  @Test
+  public void testContainsUnionType_AvroSucceeds() {
+    final String databaseName = "db";
+    final String tableName = "tbl";
+    final State serdeProps = new State();
+
+    serdeProps.setProp("avro.schema.literal", "{\"type\": \"record\", 
\"name\": \"TestEvent\","
+        + " \"namespace\": \"test.namespace\", \"fields\": 
[{\"name\":\"aUnionField\", \"type\": [\"string\", \"int\"]}]}");
+    HiveTable hiveTable = createTestHiveTable_Avro(databaseName, tableName, 
serdeProps);
+
+    Assert.assertTrue(HiveMetaStoreUtils.containsUnionTypeColumn(hiveTable));

Review Comment:
   in the function above it looks like its looking for a `uniontype` column 
name and that's not here although i do see `aUnionField` has multiple options 
for type.



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