Github user hsuanyi commented on a diff in the pull request:
https://github.com/apache/drill/pull/407#discussion_r55595195
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
---
@@ -162,6 +162,25 @@ private IterOutcome doWork() throws
ClassTransformationException, IOException, S
allocationVectors = Lists.newArrayList();
transfers.clear();
+ // If both sides of Union-All are empty
+ if(unionAllInput.isBothSideEmpty()) {
+ for(int i = 0; i < outputFields.size(); ++i) {
--- End diff --
For example, you could do:
select a, b, c from empty union all select a, b, c from empty
Then, the output should be (a, b, c) as column names.
---
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.
---