zzwqqq commented on code in PR #5385:
URL: https://github.com/apache/calcite/pull/5385#discussion_r4534561230


##########
core/src/main/java/org/apache/calcite/plan/RelOptUtil.java:
##########
@@ -287,6 +302,128 @@ public static List<CorrelationId> 
getVariablesSetAndUsed(RelNode rel0,
     return result;
   }
 
+  /** Returns whether a relational expression, its inputs and sub-queries are
+   * deterministic according to their operator declarations.
+   *
+   * <p>Assumes parameters, correlation bindings, query context and table 
contents
+   * stay fixed within the query. Function calls use
+   * {@link SqlOperator#isDeterministic()}, which allows query-stable functions
+   * such as {@code CURRENT_TIMESTAMP}. A {@link Sample} must declare 
repeatability.
+   * Unknown relational operators return false. Planner wrappers are not 
expanded.
+   *
+   * <p>Input order must also be stable where it affects the result. This 
method
+   * does not establish that property, for example for an unordered FETCH.
+   * It does not trim fields or modify the expression.

Review Comment:
   Thanks. The sentence is redundant. I've removed it.



-- 
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]

Reply via email to