zabetak commented on a change in pull request #2816:
URL: https://github.com/apache/hive/pull/2816#discussion_r759284985



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFNullif.java
##########
@@ -49,6 +50,17 @@ public ObjectInspector initialize(ObjectInspector[] 
arguments) throws UDFArgumen
     returnOIResolver = new GenericUDFUtils.ReturnObjectInspectorResolver(true);
     returnOIResolver.update(arguments[0]);
 
+    switch (arguments[0].getCategory()) {
+    case LIST:
+    case MAP:
+    case STRUCT:
+    case PRIMITIVE:
+      break;
+    case UNION:
+    default:
+      throw new UDFArgumentTypeException(0, "Unsupported Argument type 
category: " + arguments[0].getCategory());
+    }
+
     boolean isPrimitive = (arguments[0] instanceof PrimitiveObjectInspector);
     if (isPrimitive)
     {

Review comment:
       OK, my bad was confused with the nesting. Sorry for the confusion




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to