tarak271 commented on code in PR #4469: URL: https://github.com/apache/hive/pull/4469#discussion_r1257916240
########## ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFArrayIntersect.java: ########## @@ -43,19 +47,27 @@ public GenericUDFArrayIntersect() { ObjectInspector defaultOI = super.initialize(arguments); checkArgCategory(arguments, ARRAY2_IDX, ObjectInspector.Category.LIST, FUNC_NAME, org.apache.hadoop.hive.serde.serdeConstants.LIST_TYPE_NAME); //Array1 is already getting validated in Parent class + if (!ObjectInspectorUtils.compareTypes(arrayOI.getListElementObjectInspector(), ((ListObjectInspector) arguments[ARRAY2_IDX]).getListElementObjectInspector())) { // check if elements of arrays are comparable + throw new UDFArgumentTypeException(1, ERROR_NOT_COMPARABLE); + } return defaultOI; } @Override public Object evaluate(DeferredObject[] arguments) throws HiveException { Object array = arguments[ARRAY_IDX].get(); + Object array2 = arguments[ARRAY2_IDX].get(); + if (array == null) { Review Comment: Changed as recommended -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org