[
https://issues.apache.org/jira/browse/FLINK-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235379#comment-15235379
]
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_r59232978
--- Diff:
flink-optimizer/src/test/java/org/apache/flink/optimizer/operators/JoinGlobalPropertiesCompatibilityTest.java
---
@@ -93,7 +95,34 @@ public int partition(Object key, int numPartitions) {
GlobalProperties propsRight = new
GlobalProperties();
propsRight.setCustomPartitioned(keysRight,
part);
- assertTrue(descr.areCompatible(reqLeft,
reqRight, propsLeft, propsRight));
+ assertTrue(descr1.areCompatible(reqLeft,
reqRight, propsLeft, propsRight));
+ }
+
+ TestDistribution dist1 = new TestDistribution(1);
+ TestDistribution dist2 = new TestDistribution(1);
+ SortMergeInnerJoinDescriptor descr2 = new
SortMergeInnerJoinDescriptor(keysLeft, keysRight);
+
+ // test compatible range partitioning
+ {
+ Ordering ordering1 = new Ordering();
+ for (int field : keysLeft) {
+ ordering1.appendOrdering(field, null,
Order.ASCENDING);
+ }
+ Ordering ordering2 = new Ordering();
+ for (int field : keysRight) {
+ ordering2.appendOrdering(field, null,
Order.ASCENDING);
+ }
+
+ RequestedGlobalProperties reqLeft = new
RequestedGlobalProperties();
+ reqLeft.setRangePartitioned(ordering1, dist1);
+ RequestedGlobalProperties reqRigth = new
RequestedGlobalProperties();
--- End diff --
typo: `reqRigth` -> `reqRight`
copy-pasted to the CoGroup test as well.
> 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)