[ https://issues.apache.org/jira/browse/FLINK-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241502#comment-15241502 ]
ASF GitHub Bot commented on FLINK-2998: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1838#discussion_r59752679 --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/PartitionOperator.java --- @@ -84,8 +84,8 @@ public PartitionOperator(DataSet<T> input, Keys<T> pKeys, Partitioner<?> customP Preconditions.checkArgument(distribution == null || pMethod == PartitionMethod.RANGE, "Customized data distribution is only neccessary for range partition."); if (distribution != null) { - Preconditions.checkArgument(distribution.getNumberOfFields() == pKeys.getNumberOfKeyFields(), "The number of key fields in the distribution and range partitioner should be the same."); - Preconditions.checkArgument(Arrays.equals(distribution.getKeyTypes(), pKeys.getKeyFieldTypes()), "The types of key from the distribution and range partitioner are not equal."); + Preconditions.checkArgument(pKeys.getNumberOfKeyFields() <= distribution.getNumberOfFields(), "The number of key fields in range partitioner should be less than the number in the distribution."); + Preconditions.checkArgument(Arrays.equals(pKeys.getKeyFieldTypes(), Arrays.copyOfRange(distribution.getKeyTypes(), 0, pKeys.getNumberOfKeyFields())), "The type array of the partition key should be prefix of the type array of the distribution."); --- End diff -- Please split this line and update the message to "The types of the flat key fields must be a equal of the types of the fields of the distribution." > Support range partition comparison for multi input nodes. > --------------------------------------------------------- > > Key: FLINK-2998 > URL: https://issues.apache.org/jira/browse/FLINK-2998 > Project: Flink > Issue Type: New Feature > Components: Optimizer > Reporter: Chengxiang Li > Priority: Minor > > The optimizer may have potential opportunity to optimize the DAG while it > found two input range partition are equivalent, we does not support the > comparison yet. -- This message was sent by Atlassian JIRA (v6.3.4#6332)