Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/311#discussion_r23069617
  
    --- Diff: 
flink-compiler/src/main/java/org/apache/flink/compiler/dag/BinaryUnionNode.java 
---
    @@ -266,4 +268,44 @@ public void computeOutputEstimates(DataStatistics 
statistics) {
                this.estimatedOutputSize = in1.estimatedOutputSize > 0 && 
in2.estimatedOutputSize > 0 ?
                        in1.estimatedOutputSize + in2.estimatedOutputSize : -1;
        }
    +
    +   public static class UnionSemanticProperties implements 
SemanticProperties {
    +
    +           @Override
    +           public FieldSet getTargetFields(int input, int sourceField) {
    +                   if (input != 0 && input != 1) {
    +                           throw new IndexOutOfBoundsException();
    --- End diff --
    
    How about returning an exception that explains that unions only support 
input to be 0 or 1. ?


---
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.
---

Reply via email to