Github user amansinha100 commented on a diff in the pull request:
https://github.com/apache/drill/pull/407#discussion_r55559565
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
---
@@ -491,6 +556,25 @@ private void inferOutputFieldsFromLeftSide() {
}
}
+ private void inferOutputFieldsFromRightSide() {
--- End diff --
It seems like the inferencing is repeated a few times. You could have a
single function like inferOutputFieldNameAndType(outputFieldNames, batch).
The field type is always inferred from the supplied batch. For the output
names, if the outputFieldNames is null, then use the output field names as well
as type from that batch (this would be the case for left input). If not null,
then use the field names. Would that work ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---