LakeShen commented on code in PR #3379:
URL: https://github.com/apache/calcite/pull/3379#discussion_r1334909352
##########
core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java:
##########
@@ -2071,12 +2071,12 @@ private static boolean
areSelfJoinKeysUnique(RelMetadataQuery mq,
for (IntPair pair : joinInfo.pairs()) {
final RelColumnOrigin leftOrigin =
mq.getColumnOrigin(leftRel, pair.source);
- if (leftOrigin == null || !leftOrigin.isDerived()) {
Review Comment:
Could you give some code comments explaining why you changed this code?
Code comments could help people better to understand why you made a change.
##########
core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java:
##########
@@ -2071,12 +2071,12 @@ private static boolean
areSelfJoinKeysUnique(RelMetadataQuery mq,
for (IntPair pair : joinInfo.pairs()) {
final RelColumnOrigin leftOrigin =
mq.getColumnOrigin(leftRel, pair.source);
- if (leftOrigin == null || !leftOrigin.isDerived()) {
+ if (leftOrigin == null || leftOrigin.isDerived()) {
return false;
}
final RelColumnOrigin rightOrigin =
mq.getColumnOrigin(rightRel, pair.target);
- if (rightOrigin == null || !rightOrigin.isDerived()) {
+ if (rightOrigin == null || rightOrigin.isDerived()) {
Review Comment:
Same as above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]