zzwqqq commented on code in PR #5385:
URL: https://github.com/apache/calcite/pull/5385#discussion_r4454230045
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -1490,10 +1571,20 @@ private static boolean
isNonNegativeIntegralLiteral(@Nullable RexNode node) {
requireNonNull(mapNewInputToOutputs.get(newInput),
() -> "mapNewInputToOutputs.get(" + newInput + ")");
- RelNode distinct = relBuilder.push(newInput)
+ RelNode projected = relBuilder.push(newInput)
.project(relBuilder.fields(positions))
- .distinct()
.build();
+ if (!isDeterministic(projected)) {
+ // Only values and row-producing operations needed by the parameter
+ // domain are repeated. Unused volatile projections need not prevent
Review Comment:
Yes, I meant "non-deterministic". I've corrected the wording.
--
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]