mihaibudiu commented on code in PR #4332:
URL: https://github.com/apache/calcite/pull/4332#discussion_r2061057982
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -3201,6 +3210,59 @@ assert allLessThan(this.oldToNewOutputs.values(),
}
}
+ /**
+ * This method checks if the field at the given index is non-nullable. If it
is non-nullable,
Review Comment:
There is no replacement done here.
So the comment is misplaced; the comment should perhaps be on the caller of
this function.
I don't understand the discussion about "guarantee". If you cannot
guarantee, does this mean some programs will be incorrect?
##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -4178,6 +4178,35 @@ where "scott".emp.deptno in (select "scott".dept.deptno
!ok
+select *
Review Comment:
I am assuming this has been validated using some other db
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -1424,11 +1425,19 @@ private static boolean isWidening(RelDataType type,
RelDataType type1) {
}
final int newLeftPos =
requireNonNull(leftFrame.oldToNewOutputs.get(corDef.field));
final int newRightPos = rightOutput.getValue();
- conditions.add(
- relBuilder.equals(RexInputRef.of(newLeftPos, newLeftOutput),
- new RexInputRef(newLeftFieldCount + newRightPos,
- newRightOutput.get(newRightPos).getType())));
+ // TODO: If we have similar rules, perhaps it can be applied externally
Review Comment:
I don't understand this comment. Maybe it should be removed?
--
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]