okumin commented on a change in pull request #2551:
URL: https://github.com/apache/hive/pull/2551#discussion_r680138295
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/exec/WritableComparatorFactory.java
##########
@@ -19,15 +19,14 @@
import org.apache.hadoop.hive.ql.util.NullOrdering;
import
org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector.StandardUnion;
-import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
import java.util.List;
import java.util.Map;
public final class WritableComparatorFactory {
public static WritableComparator get(Object key, boolean nullSafe,
NullOrdering nullOrdering) {
if (key instanceof List) {
- // For array type struct is used as we do not know if all elements
of array are of same type.
+ // STRUCT or ARRAY are expressed as java.util.List
return new HiveStructComparator(nullSafe, nullOrdering);
Review comment:
In my understanding, all elements of ARRAY should have the same type.
-
https://github.com/apache/hive/blob/eef2a5dda0470525d0d89bd9820e761fe44dc3a8/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/StandardListObjectInspector.java#L34
-
https://github.com/apache/hive/blob/eef2a5dda0470525d0d89bd9820e761fe44dc3a8/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/ListTypeInfo.java#L39
Though UNION can have multiple types, it's expressed as a special type.
Currently, it is not supported as below.
--
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]