[ 
https://issues.apache.org/jira/browse/DRILL-4476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187520#comment-15187520
 ] 

ASF GitHub Bot commented on DRILL-4476:
---------------------------------------

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 ?


> Enhance Union-All operator for dealing with empty left input or empty both 
> inputs
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-4476
>                 URL: https://issues.apache.org/jira/browse/DRILL-4476
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> Union-All operator does not deal with the situation where left side comes 
> from empty source.
> Due to DRILL-2288's enhancement for empty sources, Union-All operator now can 
> be allowed to support this scenario.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to