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


##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -1595,10 +1686,80 @@ private RelNode findInputRel(CorRef corVar) {
     return getCorRel(corVar);
   }
 
+  /** Checks whether this input can be repeated or shared during decorrelation.
+   * Ordinary table scans assume stable contents within a query; unknown
+   * operators are not assumed deterministic.
+   */
+  private boolean isDeterministic(RelNode rel) {

Review Comment:
   Thanks. It's now public as `RelOptUtil.isDeterministic(RelNode)`. The 
restriction on unexpanded subqueries remains in `RelDecorrelator`.
   
   This uses the existing `SqlOperator.isDeterministic()` declarations, which 
allow query-stable `CURRENT_TIMESTAMP` and reject `RAND()`. I haven't changed 
function classification in this PR.



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