xiedeyantu commented on code in PR #4704:
URL: https://github.com/apache/calcite/pull/4704#discussion_r2649391617
##########
core/src/main/java/org/apache/calcite/tools/Programs.java:
##########
@@ -259,7 +260,26 @@ public static Program subQuery(RelMetadataProvider
metadataProvider) {
CoreRules.PROJECT_SUB_QUERY_TO_CORRELATE,
CoreRules.JOIN_SUB_QUERY_TO_CORRELATE,
CoreRules.PROJECT_OVER_SUM_TO_SUM0_RULE));
- return of(builder.build(), true, metadataProvider);
+ final Program oldProgram = of(builder.build(), true, metadataProvider);
+
+ final HepProgramBuilder newBuilder = HepProgram.builder();
+ newBuilder.addRuleCollection(
Review Comment:
I only found this one instance of logic for handling subqueries; there's
nothing else. I'm also a bit confused about why it handles SUM, but since this
is code from 2024, I've decided to keep it here for now, we can see
[CALCITE-6020](https://issues.apache.org/jira/browse/CALCITE-6020).
--
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]