cnauroth commented on code in PR #3735:
URL: https://github.com/apache/hive/pull/3735#discussion_r1064216233
##########
serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java:
##########
@@ -150,6 +152,11 @@ public void testThriftSetObjectInspector() throws
Throwable {
assertEquals(Category.STRUCT, oi1.getCategory());
StructObjectInspector soi = (StructObjectInspector) oi1;
List<? extends StructField> fields = soi.getAllStructFieldRefs();
+ Collections.sort(fields, new Comparator<StructField>() {
Review Comment:
The `Comparator` anonymous inner class could be shortened to
`Comparator.comparing(StructField::getFieldName)`.
##########
serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java:
##########
@@ -176,6 +183,11 @@ public void testThriftSetObjectInspector() throws
Throwable {
assertEquals("setString", soi.getStructFieldData(s, fields.get(1)));
// sub fields
+ Collections.sort(fields, new Comparator<StructField>() {
Review Comment:
Similarly, this could be shortened to
`Comparator.comparing(StructField::getFieldObjectInspector`.
However, I'm also not clear why it would need to be resorted by a different
key for the next assertions.
--
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]