kgyrtkirk commented on a change in pull request #2816:
URL: https://github.com/apache/hive/pull/2816#discussion_r759265569
##########
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:
we are only filtering out the `VOID_GROUP` - for complex types I don't
think we should do anything beyond checking that the 2 arguments are of the
same 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]