korlov42 commented on a change in pull request #2623:
URL: https://github.com/apache/calcite/pull/2623#discussion_r767818783
##########
File path: core/src/main/java/org/apache/calcite/rel/core/RelFactories.java
##########
@@ -162,10 +162,20 @@ private RelFactories() {
* @param hints The hints
* @param childExprs The projection expressions
* @param fieldNames The projection field names
+ * @param variablesSet Correlating variables that are set when reading
+ * a row from the input, and which may be referenced from inside the
+ * projection
* @return a project
*/
RelNode createProject(RelNode input, List<RelHint> hints,
- List<? extends RexNode> childExprs, @Nullable List<? extends @Nullable
String> fieldNames);
+ List<? extends RexNode> childExprs, @Nullable List<? extends @Nullable
String> fieldNames,
+ Set<CorrelationId> variablesSet);
+
+ @Deprecated // to be removed before 2.0
+ default RelNode createProject(RelNode input, List<RelHint> hints,
+ List<? extends RexNode> childExprs, @Nullable List<? extends @Nullable
String> fieldNames) {
+ return createProject(input, hints, childExprs, fieldNames,
ImmutableSet.of());
+ }
Review comment:
> Does this change mean that every implementation has to implement
variablesSet in Project? In other words, what if mongo adapter does not support
correlation columns as a part of Project? What should it do? Should the rules
be updated to convert the project into something else?
Such case could be avoided by applying SubQueryRemoveRule. After this rule
all correlated project would be rewritten to either Correlate or correlated
Join. Or someone could possibly implement a correlated project.
--
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]