miklosgergely commented on a change in pull request #1267:
URL: https://github.com/apache/hive/pull/1267#discussion_r456062008
##########
File path:
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/objectinspector/LazyBinaryObjectInspectorFactory.java
##########
@@ -53,10 +54,10 @@ public static LazyBinaryStructObjectInspector
getLazyBinaryStructObjectInspector
public static LazyBinaryStructObjectInspector
getLazyBinaryStructObjectInspector(
List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors, List<String>
structFieldComments) {
- ArrayList<Object> signature = new ArrayList<Object>(3);
- signature.add(structFieldNames);
- signature.add(structFieldObjectInspectors);
- if(structFieldComments != null) {
+ List<Object> signature = structFieldComments == null ?
Arrays.asList(structFieldNames, structFieldObjectInspectors)
+ : Arrays.asList(structFieldNames, structFieldObjectInspectors,
structFieldComments);
+
+ if (structFieldComments != null) {
Review comment:
Isn't this a duplication? I mean if structFieldComments is not null, it
will be already in signature due to the command above.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]